The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
SQL select only not-deleted posts in a thread
I would like to build a SQL sentence where can get all postids from a thread, but no those who has been deleted.
I tried this: PHP Code:
Any help? Thanks in advance! |
#2
|
||||
|
||||
[sql]
SELECT postid FROM post WHERE ((threadid=$tid) AND (visible<>1)) ORDER BY postid DESC") [/sql] <> is the MySQL NOT operator |
#3
|
||||
|
||||
Dean i think he meant something different
you have to join the deletion log table: [sql]SELECT * FROM post LEFT JOIN deletionlog ON(deletionlog.primaryid = post.postid AND type = 'post') WHERE deletionlog.primaryid IS NULL [/sql] |
#4
|
|||
|
|||
That is!
Thanks a lot |
#5
|
||||
|
||||
you're welcome
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|