$query = $this->db->query("SELECT * FROM default_albums da
INNER JOIN default_album_hc_connect d ON d.albums_id = da.album_id_da
INNER JOIN default_hottest_categories dhc ON dhc.id = d.hottest_categories_id
WHERE dhc.is_hottest = 'Yes'");
以上是我目前的查询。我有一个名为结果的数组,正在从ajax帖子中提取。如何获取该数组并返回与该数组中的值不相等的行?
答案 0 :(得分:1)
NOT IN
条件怎么样?
" (...)
WHERE (...)
AND whatever NOT IN (\"" . implode('", "', $array) . "\")";