The Arcive of vBulletin Modifications Site. |
|
custom LAST10 on non-vb doesn't exclude Details »»
|
|||||||||||||||||||||||||
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"); Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
me trying to fix yours
[sql]$threads=$DB_site->query("SELECT * FROM thread WHERE open='1' AND open<>10 $iforumperms ORDER BY lastpost DESC LIMIT $maxthreads" AND NOT IN(24)");[/sql] something i done earlier integrated [sql]$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"); [/sql]try that
|
|
#3
|
|||
|
|||
|
thanx man.. .your 2nd suggestion worked... i had to take out AND $forumperms though...
thanx again! |
![]() |
|
|