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 ('Tralcio')) WHERE pd.language_id = '1' AND p.status = '1' AND p.date_available <= NOW() AND p2s.store_id = '0' AND (p2c.category_id IN(5000,706,677,691,675,676,703,666,670,673,686,688,690,693,678,828,679,680,821,827,681,829,682,683,684,822,685,701,668,687,532,533,667,825,534,826,669,531,5233,699,823,525,524,936,824,530,696,519,520,521,461,456,5232,458,457,450,449,451,702,454,672,637,700,657,659,704,660,661,663,665,662,658,664,654,5157,653,652,651,5158,5042,590,591,589,5674,5678,5672,5673,932,5675,5663,638,5676,5677,5686,613,671,615,933,5687,616,5679,586,619,620,621,935,622,623,624,625,626,627,628,5662,642,631,632,643,715,452,453,448,705,526,447,479,478,466,493,498,494,495,497,496,481,482,491,489,483,487,490,484,486,485,488,16,465,14,15,12,714,13,11,480,492,464,5002,5001)) 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