Database_Exception [ 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 ') AND (`body_index`.`Id` <= 0) ORDER BY `body_index`.`Id`' at line 6 [ SELECT `body`.`Id`, `body`.`ResName`, `body`.`Price`, `body`.`Stock`, `body`.`Guar`, `body`.`In_Out` FROM `body`, `body_index` WHERE (`body`.`Id`=`body_index`.`Body_Id`) AND (`body_index`.`Level`=-1) AND (`body_index`.`Id` > ) AND (`body_index`.`Id` <= 0) ORDER BY `body_index`.`Id` ]

MODPATH/database/classes/kohana/database/mysql.php [ 194 ]

189 			{
190 				// This benchmark is worthless
191 				Profiler::delete($benchmark);
192 			}
193 
194 			throw new Database_Exception(':error [ :query ]',
195 				array(':error' => mysql_error($this->_connection), ':query' => $sql),
196 				mysql_errno($this->_connection));
197 		}
198 
199 		if (isset($benchmark))
  1. MODPATH/database/classes/kohana/database/query.php [ 245 ] » Kohana_Database_MySQL->query(arguments)

  2. APPPATH/classes/model/catalog.php [ 51 ] » Kohana_Database_Query->execute()

  3. APPPATH/classes/controller/catalog.php [ 25 ] » Model_Catalog->showCategory(arguments)

  4. {PHP internal call} » Controller_Catalog->action_index()

  5. SYSPATH/classes/kohana/request/client/internal.php [ 118 ] » ReflectionMethod->invoke(arguments)

  6. SYSPATH/classes/kohana/request/client.php [ 64 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  7. SYSPATH/classes/kohana/request.php [ 1138 ] » Kohana_Request_Client->execute(arguments)

  8. DOCROOT/index.php [ 109 ] » Kohana_Request->execute()

Environment