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
JOIN shop_product_skus ps1
ON ps1.product_id = p.id
JOIN shop_product_features pf1
ON (pf1.product_id = p.id AND (pf1.sku_id IS NULL OR pf1.sku_id = ps1.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 = 594
AND ps1.available > 0 AND ps1.status
AND pf1.feature_id = 29 AND pf1.feature_value_id IN (0)
ORDER BY pr.datetime DESC
LIMIT 20,20