PDA

View Full Version : SQL error, not sure where from....


DiscussAnything
07-01-2003, 04:01 PM
This is for a new (additional) forum I'm setting up, the license has been bought and is in process, just so you know..

I'm getting the msg below emailed to me. It's been 3 or 4 time already, but I'm not sure where it's coming from. There is no forum/forum dir though....


Invalid SQL: SELECT COUNT(*) AS posts FROM post
LEFT JOIN thread ON thread.threadid=post.threadid WHERE post.visible=1 AND post.threadid= AND 1=1 AND NOT (thread.forumid='10' OR thread.forumid='11') AND post.userid='3'
mysql error: You have an error in your SQL syntax near 'AND 1=1 AND NOT (thread.forumid='10' OR thread.forumid='11') AND post.userid='3' at line 2

mysql error number: 1064

Date: Tuesday 01st of July 2003 12:57:11 PM
Script: http://www.chopperweb.net/forum/forum/search.php?action=showresults&searchid=10



I have the vbhome hack and some others, is there any way to find out what this means and how to fix it?

forumid 10 & 11 are for the staff category and staff forum. I tried to look in the search.php but it's not in there. The closest I can get is

$getnum=$DB_site->query_first("SELECT COUNT(*) AS posts FROM post
".
iif(strlen(strpos($search[query],"thread."))," LEFT JOIN thread ON thread.threadid=post.threadid ","").
" WHERE post.visible=1 AND $newpostsql $searchthreadquery $search[query]");



help?

filburt1
07-01-2003, 04:58 PM
post.threadid=

There needs to be a threadid of a thread after that.

DiscussAnything
07-01-2003, 04:59 PM
yeah i noticed that, but I can't seem to find that query. Any ideas?