Array ( [0] => 42000 [1] => 1064 [2] => 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 ') WHERE 1 AND p.active > 0 AND w.pricet > 0 GROUP BY w.id ' at line 9 ) Array ( [0] => Array ( [file] => /mnt/data/www/kolobox/models/Product.php [line] => 1414 [function] => query [class] => DB [type] => :: [args] => Array ( [0] => SELECT w.*, p.id AS prod_id, p.img_src, p.path, p.parent_id, p.alias, t.alias AS tmalias, IF(w.price > 0, 0, 1) AS isprice, IF(inner_stock.stock, 0, 1) AS incitystock FROM atvtyres AS w INNER JOIN catalog_moto AS p ON w.prod_id = p.id LEFT JOIN tmarks AS t ON p.tmark = t.id LEFT JOIN atyres_stock AS inner_stock ON inner_stock.code = w.id AND inner_stock.warehouse_id IN () WHERE 1 AND p.active > 0 AND w.pricet > 0 GROUP BY w.id ORDER BY incitystock, w.pricet, isprice, t.tpriority desc, w.price LIMIT 0, 20 [1] => Array ( ) ) ) [1] => Array ( [file] => /mnt/data/www/kolobox/controllers/AtvController.php [line] => 540 [function] => getATVTyres [class] => Product [type] => :: [args] => Array ( ) ) [2] => Array ( [file] => /mnt/data/www/kolobox/index.php [line] => 38 [function] => getSelection [class] => AtvController [object] => AtvController Object ( [content:protected] => [zima:protected] => 1 [noprod:protected] => [instock:protected] => [page_size:protected] => 20 [imagepath:protected] => /files/moto [prev_path:protected] => /preview/type_catalog_small [prev_path_medium:protected] => /preview/type_catalog_medium [prev_path_small:protected] => /preview/type_catalog_small [stock_cache:protected] => atyres_stock ) [type] => -> [args] => Array ( ) ) )