1064. Query Error 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 'DISTINCT pr.*,1 AS count_null
FROM shop_product_reviews AS pr
JOIN shop_pro...' at line 1
Query: SELECT `rd1`.*,DISTINCT pr.*,1 AS count_null
FROM shop_product_reviews AS pr
JOIN shop_product p
ON p.id = pr.product_id
JOIN shop_category_products cp1
ON p.id = cp1.product_id
LEFT JOIN shop_reviewsplus_dop rd1
ON rd1.review_id = pr.id
WHERE pr.parent_id = 0
AND pr.status = 'approved'
AND p.type_id IN (6,13,11,10,7,12,1,9,14,8,4,3,2)
AND p.status = 1
AND cp1.category_id IN(686,718,719,720,722,730,736,737,754,755,756,757,758,759,760,767,768,769,770,771,772,773,774,775,777,785,786,787,832,833,834,835,836,837,838,839,840,841,842,843,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,889,890,891,892,907,908,949)
ORDER BY pr.datetime DESC
LIMIT 20