我基本上是在 mySQL 查询期间尝试使用 NOT IN 函数两次 我的新当前查询如下
SELECT `o`.`id`, `o`.`name`, `o`.`url`, `o`.`type`, `o`.`desc` FROM `offers` as `o`
WHERE `o`.country_iso = '$country_iso' AND `o`.`id` not in
(select distinct(offer_id) from conversions where ip = '$_SERVER[REMOTE_ADDR]'
and converted != '0') AND `o`.`id` not in
(select `offer_id` from `aff_disabled_offers` where `offer_id` = 'o.id'
and `user_id` = '1') ORDER by rand() LIMIT $limit
该查询有效,但由于某种原因它完全忽略了这一点
AND `o`.`id` not in
(select `offer_id` from `aff_disabled_offers` where `offer_id` = 'o.id')