Fatal error: Uncaught Exception: Error: Column 'pd.product_id' in on clause is ambiguous<br />Error No: 1052<br />
SELECT
p.product_id,
COALESCE(avg_rating.rating, 0) as rating,
pd.discount_price as discount,
ps.special_price as special
FROM `oc_product` p
LEFT JOIN (
SELECT product_id, AVG(rating) as rating
FROM `oc_review`
WHERE status = '1'
GROUP BY product_id
) avg_rating ON (p.product_id = avg_rating.product_id)
LEFT JOIN (
SELECT pd_inner.product_id, pd_inner.price as discount_price
FROM `oc_product_discount` pd_inner
INNER JOIN (
SELECT product_id, MIN(priority) as min_priority
FROM `oc_product_discount`
WHERE customer_group_id = '1'
AND quantity = '1'
AND ((date_start = '0000-00-00' OR date_start < NOW())
AND (date_end = '0000- in /www/wwwroot/wholesalejerseyzone.com/storage/modification/system/library/db/mysqli.php on line 53