Notice: Error: 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 '(rating) AS total FROM myoc_review r1 WHERE r1.product_id = p.product_id AND r1.' at line 1
Error No: 1064
SELECT SQL_CACHE p.product_id, (SELECT SQL_CACHE AVG(rating) AS total FROM myoc_review r1 WHERE r1.product_id = p.product_id AND r1.status = '1' GROUP BY r1.product_id) AS rating FROM myoc_product p LEFT JOIN myoc_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN myoc_product_to_store p2s ON (p.product_id = p2s.product_id) LEFT JOIN myoc_product_to_category p2c ON (p.product_id = p2c.product_id) INNER JOIN myoc_product_attribute pa1 ON ( pa1.product_id = p.product_id AND pa1.attribute_id = '20' AND pa1.text IN ('Oasis')) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (p2c.category_id IN(5018,99,102,104,105,349,106,107,170,132,346,171,345,324,323,322,172,348,320,5234,321,5231,5230,144,344,143,343,5646,145,146,147,325,148,149,150,151,5537,326,327,328,329,331,332,333,334,335,336,337,338,5538,339,340,341,342,101,152,5229,100,98,500,567,509,517,207,209,511,512,208,502,568,503,504,505,506,510,5536,501,507,516,508,206,187,177,192,202,211,185,210,195,197,200,194,175,188,190,198,203,199,186,179,181,183,189,180,193,176,182,196,178,174,173,5020,5019)) GROUP BY p.product_id ORDER BY p.sort_order ASC LIMIT 0,16 in /home/gassibco/domains/domstyle.com.ua/public_html/system/database/mysql.php on line 69