0
$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'");

以上是我目前的查询。我有一个名为 results 的数组,它是从 ajax 帖子中提取的。如何获取该数组并返回不等于该数组中的值的行?

4

1 回答 1

1

NOT IN条件呢?

" (...)
WHERE (...)
    AND whatever NOT IN (\"" . implode('", "', $array) . "\")";
于 2013-06-06T21:38:20.630 回答