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 MariaDB server version for the right syntax to use near 'GROUP BY ru_product.id ORDER BY `stock` DESC, `code` ASC, `pri' at line 33 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 = '2d670b8cce053eb08212c554d133d0f1' LEFT JOIN product_countries prod_c ON prod_c.product_id=ru_product.id LEFT JOIN ru_brend d ON d.id=ru_product.brend_id WHERE ru_product.id!='0' and ru_product.name!='' AND ru_product.url!='' AND prod_c.countries_id = GROUP BY ru_product.id ORDER BY `stock` DESC, `code` ASC, `price_sort` DESC, `name` asc, id desc'.