Thanks buddy for reply.
Here is what I mean. I have a table called Ads which has a column called tid right. This TID column stores tids that correspond to forum real TIDs
I would like to fetch all thread tids and then all ads tids compare them and then output Thread tids that are not in the Ads tid column.
When I fetch tids they all show like one long number. How to put a comma in the middle to use it in NOT IN expression
Is this OK to use? Looks ugly to me!
Here is what I mean. I have a table called Ads which has a column called tid right. This TID column stores tids that correspond to forum real TIDs
I would like to fetch all thread tids and then all ads tids compare them and then output Thread tids that are not in the Ads tid column.
$query = $db->query("
SELECT t.tid
FROM ".TABLE_PREFIX."threads t
WHERE t.tid NOT IN (how to fetch ads tid from here)
");
When I fetch tids they all show like one long number. How to put a comma in the middle to use it in NOT IN expression
$query2 = $db->query("
SELECT t.tid
FROM ".TABLE_PREFIX."threads t
WHERE t.tid NOT IN (SELECT a.tid
FROM ".TABLE_PREFIX."ads a)
");
Is this OK to use? Looks ugly to me!