Quote:
Originally Posted by BirdOPrey5
No it doesn't cover subforums, each forumid must be entered manually. You can add more ANDs or consult a mysql manual for a better query.
|
Better query
Code:
$SQL = "SELECT postid, " . TABLE_PREFIX . "post.dateline, pagetext, forumid
FROM " . TABLE_PREFIX . "post join " . TABLE_PREFIX . "thread on (" . TABLE_PREFIX . "post.threadid = " . TABLE_PREFIX . "thread.threadid)
WHERE iei_parsed = 0
AND pagetext LIKE '%[/IMG]%'
AND NOT forumid IN (1, 2, 3)
ORDER BY postid";
The IN clause holds all forums to
exclude. Contrarily:
Code:
$SQL = "SELECT postid, " . TABLE_PREFIX . "post.dateline, pagetext, forumid
FROM " . TABLE_PREFIX . "post join " . TABLE_PREFIX . "thread on (" . TABLE_PREFIX . "post.threadid = " . TABLE_PREFIX . "thread.threadid)
WHERE iei_parsed = 0
AND pagetext LIKE '%[/IMG]%'
AND forumid IN (4, 5, 6)
ORDER BY postid";
The IN clause holds all forums to
include.
As always, please try first in a sandbox