Database_Exception [ 0 ]: [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 '-3' at line 1 ( SELECT * FROM `pages` WHERE `lft` > '2' AND `rgt` < '39' AND (`lvl` > '2' AND `lvl` <= 3) AND (`type` = 'News') ORDER BY `lft` ASC LIMIT 3 OFFSET -3 )

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

176 			{
177 				// This benchmark is worthless
178 				Profiler::delete($benchmark);
179 			}
180 
181 			throw new Database_Exception(mysql_errno($this->_connection), '[:code] :error ( :query )', array(
182 				':code' => mysql_errno($this->_connection),
183 				':error' => mysql_error($this->_connection),
184 				':query' => $sql,
185 			));
186 		}
  1. MODPATH/database/classes/kohana/database/query.php [ 225 ] » Kohana_Database_MySQL->query(arguments)

  2. APPPATH/classes/orm/mptt.php [ 105 ] » Kohana_Database_Query->execute()

  3. APPPATH/classes/xml.php [ 327 ] » ORM_MPTT->xchildren_my(arguments)

  4. APPPATH/classes/controller/index.php [ 199 ] » Xml::loadxml(arguments)

  5. {PHP internal call} » Controller_Index->action_index(arguments)

  6. SYSPATH/classes/kohana/request/client/internal.php [ 132 ] » ReflectionMethod->invokeArgs(arguments)

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

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

Environment