PDA

View Full Version : custom LAST10 on non-vb doesn't exclude


stryka
11-19-2003, 03:46 PM
I have a "LATEST THREADS" section on my homepage... and

I am trying to exclude a forum within the SQL and it isn't working... threads are still showing up on my homepage.. i want to exclude threads in FORUMID 24?? WHat am i doing wrong? I've tried 24 with and without quotes...

$threads=$DB_site->query("SELECT * FROM thread WHEREforumid!=24 AND open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxthreads");

sabret00the
11-19-2003, 04:43 PM
me trying to fix yours
$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxthreads" AND NOT IN(24)");

something i done earlier integrated
$threads = $DB_site->query("SELECT replycount,title,threadid,lastpost,postusername,la stposter,views FROM thread WHERE forumid NOT IN (XX,XX) AND $forumperms ORDER BY lastpost DESC LIMIT $maxthreads");
try that :)

stryka
11-20-2003, 06:02 PM
thanx man.. .your 2nd suggestion worked... i had to take out AND $forumperms though...

thanx again!