Error!Catched error 40642000: SQLSTATE[42000]: Syntax error or access violation: 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 'GROUP BY ru_product.id ORDER BY `stock` DESC, `code` ASC, `pric' at line 34 in /home/vpkpodsh/public_html/library/pdo.php on line 45. Query: 'select ru_product.id, ru_product.img, ru_product.youtube, ru_product.url, ru_product.name, ru_product.price, ru_product.text, ru_product.size, ru_product.size2, ru_product.height, ru_product.stock, ru_product.kind, ru_product.characteristics, ru_catalog.name as catalog, ru_catalog.url as cat_url, ru_catalog.name_one, favorites.product_id as fav_id, d.title as brend_name ,CASE price WHEN 0 THEN 100000 ELSE price END AS price_sort from ru_product LEFT JOIN ru_catalog ON ru_catalog.id=ru_product.cat_id LEFT JOIN favorites ON favorites.product_id = ru_product.id AND favorites.session_id = 'llnifu232dthvj3bume01l6481' LEFT JOIN ru_brend d ON d.id=ru_product.brend_id WHERE ru_product.id!='0' and ru_product.name!='' AND ru_product.brend_id = GROUP BY ru_product.id ORDER BY `stock` DESC, `code` ASC, `price_sort` DESC, `name` asc, id desc'.