"Колор-Сити", ТВЦ "Аллегро"
г. Ярославль, пр-т Фрунзе, 38
т:(4852) 58-46-66; (4852) 68-18-90
colorcity.yar@yandex.ru, petrova5@yandex.ru

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 'ORDER BY `prices`.`main` DESC, `prices`.`pos`' at line 10 [ SELECT `prices`.`id`, `prices`.`price`, `prices`.`main`, (SELECT `price_types`.`type` FROM `price_types` WHERE `price_types`.`id` = `prices`.`type_id`) AS `type` FROM `prices` WHERE `prices`.`product_id` = ORDER BY `prices`.`main` DESC, `prices`.`pos` ]

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. APPPATH/classes/Controller/Products.php [ 340 ] » Kohana_Database_Query->execute()

  3. APPPATH/views/Products/products_view_view.php [ 17 ] » Controller_Products::price(arguments)

  4. SYSPATH/classes/Kohana/View.php [ 61 ] » include(arguments)

  5. SYSPATH/classes/Kohana/View.php [ 348 ] » Kohana_View::capture(arguments)

  6. SYSPATH/classes/Kohana/View.php [ 228 ] » Kohana_View->render()

  7. APPPATH/views/Product.php [ 31 ] » Kohana_View->__toString()

  8. SYSPATH/classes/Kohana/View.php [ 61 ] » include(arguments)

  9. SYSPATH/classes/Kohana/View.php [ 348 ] » Kohana_View::capture(arguments)

  10. SYSPATH/classes/Kohana/Controller/Template.php [ 44 ] » Kohana_View->render()

  11. SYSPATH/classes/Kohana/Controller.php [ 87 ] » Kohana_Controller_Template->after()

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

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

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

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

  16. DOCROOT/index.php [ 124 ] » Kohana_Request->execute()

Environment