The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need help on an sql query
Little stumped.
I want to display all posts that contain an [IMG] tag and are not in a deleted thread. Something like: SELECT * FROM post WHERE pagetext='[img]' WHERE thread.threadid=post.threadid AND thread.visible=1 --------------- Added [DATE]1307553941[/DATE] at [TIME]1307553941[/TIME] --------------- still trying SELECT * FROM post WHERE pagetext LIKE '%[img]%' WHERE post.threadid=thread.threadid AND thread.visible = 1 |
#2
|
||||
|
||||
You need to JOIN the thead table onto the post table...
Try Code:
SELECT * FROM post, thread WHERE post.threadid=thread.threadid AND pagetext LIKE '%[img]%' AND thread.visible = 1 |
#3
|
|||
|
|||
SELECT pagetext FROM post, thread WHERE pagetext LIKE '%[img]%' AND post.threadid=thread.threadid AND thread.visible = 1
^^^ that got it workin |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|