PDA

View Full Version : search -> SQL error


jedie
05-04-2011, 02:46 PM
with http://search.cgsociety.org/?search=containers i get:
A Database Error Occurred

Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '11)' at line 1

SELECT * FROM usergroup WHERE usergroupid IN (,11)

jedie
05-18-2011, 06:44 AM
not fixed yet. any statement?

Keenly
05-19-2011, 05:46 AM
Thanks Jedie,
I'm not actually seeing the error (i'm getting a different error when i click on a search result however :sad: ). Is it all you see when you goto that URL, or do you have to click on a link?

and can you search for anything else fine?

jedie
05-19-2011, 07:15 AM
Yes, i see only this. The complete error page code is here: http://pastie.org/1925507

But funny: This error comes only, if i logged in! If i not logged in, everything works fine.

inactionjackson
05-19-2011, 10:19 PM
I'm having the same problem, exact same error message no matter what I search for. I'm not sure what that query is used for but if you either remove the comma from the (,11) or add another number in front of the comma it would fix the problem. If your just searching the database for 1 id use " WHERE usergroupid = '11' " the "WHERE IN" function is used to search through an array of multiple options...I'm sure whoever is working on the site knew that already but I thought I'd try and be helpful.

Keenly
05-20-2011, 02:05 AM
All fixed!

Thank you both very much for your help.

CGTalk Moderation
05-20-2011, 02:05 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.