![]() |
with it no good
Hi guys,
I have 4 sql queries command, but for some reason, with the last one, it doesn't work, but when i take it out, it worksl ike charm... can somebody help me? Code:
<? $lilet_db = mysql_query("SELECT title,threadid,firstpostid,forumid FROM localhost_vbnews.thread WHERE forumid IN $channels AND attach <>0 AND title !='$et[title]' ORDER BY dateline DESC limit 30") or die(mysql_error()); This is the query that throws it off... i'm not sure why :( The thing for sure is that, not all threads has replies with title "position"... could this be the problem? Here is the one that I'm having a hard time on Code:
$position_db = mysql_query("SELECT pagetext FROM localhost_vbnews.post WHERE threadid=$lilet[threadid] AND title='position' ORDER BY dateline DESC limit 1") or die(mysql_error()); |
Well the query will only return threads that have the exact title 'position', vB adds "RE:" to replies by default so you may only return a small number of entries.
I don't really know what you are trying to achieve but you could just remove the AND title='postion' |
well, I wanted one query to pull out a thread with the title exactly like position...
|
It might be due to language, but 'exactly' and 'like' are 2 words that contradict.
If you want the title to be exactly 'position': [sql]..WHERE title = 'postition'...[/sql] If you want the title to contain the word 'position': [sql]...WHERE title LIKE '%position%'[/sql] |
All times are GMT. The time now is 02:16 AM. |
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:
|