You have an error in your SQL syntax

Ted.Szukalski

Joined: 2006-06-22
Posts: 10
Posted: Tue, 2012-04-24 02:30

I just encountered following error, while navigating to a photo.
Interestingly the error includes a search query I performed 30 minutes earlier.Shouldn't the query parameter be somehow cleared after the search query is completed?

Hey wait, you're an admin! We can tell you stuff.

There's an error message below and you can find more details in gallery3/var/logs (look for the file with the most recent date on it). Stuck? Stop by the Gallery 3 Forums and ask for help. You can also look at our list of open tickets to see if the problem you're seeing has been reported. If you post a request, here's some useful information to include:
Platform information

Host name: rho.elinuxservers.com
Operating system: Linux 3.2.9H
Apache: Unknown
PHP: 5.2.14
MySQL: 5.0.91-community-log
Server load: 1.37 1.8 1.75
Graphics toolkit: gd
Gallery stats
Version: 3.0.3 (Hotlanta)
Albums: 214
Photos: 6054
Database_Exception [ Database Error ]:
#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 '' at line 1 [ SELECT SQL_CALC_FOUND_ROWS _g3items.*, MATCH(_g3search_records.`data`) AGAINST ('osiris osiri*') AS `score` FROM _g3items JOIN _g3search_records ON (_g3items.`id` = _g3search_records.`item_id`) WHERE MATCH(_g3search_records.`data`) AGAINST ('osiris osiri*' IN BOOLEAN MODE) HAVING `score` >= ]
SYSPATH/libraries/Database_Mysql_Result.php[ 27 ]

22 }
23 elseif (is_bool($result))
24 {
25 if ($result == FALSE)
26 {
27 throw new Database_Exception('#:errno: :error [ :query ]',
28 array(':error' => mysql_error($link),
29 ':query' => $sql,
30 ':errno' => mysql_errno($link)));
31
32 }
SYSPATH/libraries/Database_Mysql.php[ 124 ] » Database_Mysql_Result_Core->__construct( arguments )
SYSPATH/libraries/Database.php[ 272 ] » Database_Mysql_Core->query_execute( arguments )
MODPATH/gallery/libraries/MY_Database.php[ 45 ] » Database_Core->query( arguments )
MODPATH/search/helpers/search.php[ 125 ] » Database->query( arguments )
MODPATH/search/controllers/search.php[ 74 ] » search_Core::get_position( arguments )
MODPATH/gallery/helpers/item.php[ 431 ] » Search_Controller::get_display_context( arguments )
MODPATH/gallery/controllers/photos.php[ 34 ] » item_Core::get_display_context( arguments )
{PHP internal call} » Photos_Controller->show( arguments )
SYSPATH/core/Kohana.php[ 331 ] » ReflectionMethod->invokeArgs( arguments )
SYSPATH/core/Event.php[ 208 ] » Kohana_Core::instance( arguments )
APPPATH/Bootstrap.php[ 67 ] » Event_Core::run( arguments )
DOCROOT/index.php[ 102 ] » require( arguments )
Environment