![]() |
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 |
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 |
SELECT pagetext FROM post, thread WHERE pagetext LIKE '%[img]%' AND post.threadid=thread.threadid AND thread.visible = 1
^^^ that got it workin |
All times are GMT. The time now is 11:10 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|