Database_Exception [ 1064 ]: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-20' at line 1 [ SELECT `products`.`pr_id` AS `pr_id`, `products`.`pr_sc_id` AS `pr_sc_id`, `products`.`pr_name` AS `pr_name`, `products`.`pr_price` AS `pr_price`, `products`.`pr_price_discount` AS `pr_price_discount`, `products`.`pr_short_desc` AS `pr_short_desc`, `products`.`pr_desc` AS `pr_desc`, `products`.`pr_slug` AS `pr_slug`, `products`.`pr_enabled` AS `pr_enabled`, `products`.`pr_featured` AS `pr_featured`, `products`.`pr_to_news` AS `pr_to_news`, `products`.`pr_created_at` AS `pr_created_at` FROM `products` AS `products` WHERE `products`.`pr_sc_id` = '19' AND `pr_enabled` = 1 ORDER BY `pr_id` DESC LIMIT 20 OFFSET -20 ]

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 [ 251 ] » Kohana_Database_MySQL->query(arguments)

  2. MODPATH/orm/classes/Kohana/ORM.php [ 1060 ] » Kohana_Database_Query->execute(arguments)

  3. MODPATH/orm/classes/Kohana/ORM.php [ 1001 ] » Kohana_ORM->_load_result(arguments)

  4. MODPATH/orm/classes/ORM.php [ 322 ] » Kohana_ORM->find_all()

  5. APPPATH/classes/Model/Products.php [ 82 ] » ORM->find_all()

  6. APPPATH/classes/Controller/Webshop.php [ 45 ] » Model_Products->getPager(arguments)

  7. SYSPATH/classes/Kohana/Controller.php [ 84 ] » Controller_Webshop->action_subcategories()

  8. {PHP internal call} » Kohana_Controller->execute()

  9. SYSPATH/classes/Kohana/Request/Client/Internal.php [ 97 ] » ReflectionMethod->invoke(arguments)

  10. SYSPATH/classes/Kohana/Request/Client.php [ 114 ] » Kohana_Request_Client_Internal->execute_request(arguments)

  11. SYSPATH/classes/Kohana/Request.php [ 990 ] » Kohana_Request_Client->execute(arguments)

  12. DOCROOT/index.php [ 119 ] » Kohana_Request->execute()

Environment