I am trying to execute a nested query which is failing using mysqli::query method. The query works perfectly on mysql command prompt.
Here is the relevant piece of code:
$select_records = "SELECT c.creative_id
                        FROM creatives AS c
                        WHERE c.creative_id NOT
                        IN (
                            SELECT tr.creative_id
                            FROM  `term_relationships` AS tr
                            INNER JOIN  `terms` AS t ON t.term_id = tr.term_id
                            WHERE t.taxonomy =  'category'
                        )
                        ORDER BY c.creative_id ASC ";
$res = $this -> mysqli_connect -> query($select_records);
$res yields false
How to do this? Thanks.
 
    