This topic was marked solved by Nao, on March 1st, 2014, 02:18 PM
Database Error: You have an error in your SQL syntax...

txcas

  • Bug Zapper
  • Posts: 202
Database Error: You have an error in your SQL syntax...
« on March 1st, 2014, 03:37 AM »
I found this in the error log.

Code: [Select]
URL http://www.domain.com/do/search2/
Database Error: 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 '' at line 3
Only show the errors from this file File: /home/creedmoo/public_html/gz/app/Search2.php
 Line: 232

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Database Error: You have an error in your SQL syntax...
« Reply #1, on March 1st, 2014, 02:13 PM »
I can't reproduce this. The error doesn't show the complete query.
Please go to Admin > Server > Error log > Settings, and enable the logging of DB queries. Then, if and when this happens again, please post the complete query.
Oh, scratch that... It's good if you enable this, but I was able to reproduce.
Search for anything, and instead of '*' in the username box, enter ',' (just a comma), or a space (or several). Boom, error shows up.
Will fix in a minute.

Farjo

  • "a valuable asset to the community"
  • Posts: 492