Fatal error: Uncaught Exception: Error: Not unique table/alias: 'pd'<br />Error No: 1066<br />
SELECT
p.product_id,
AVG(r.rating) as rating,
pd.name,
p.model,
p.quantity,
p.price,
IFNULL(ps.price, IFNULL(pd2.price, p.price)) as final_price,
p.viewed as `p.viewed`,
IF(p.quantity, 1, 0) as in_stock
FROM `oc_product` p
LEFT JOIN `oc_product_description` pd ON (p.product_id = pd.product_id AND pd.language_id = '1')
LEFT JOIN `oc_product_to_store` p2s ON (p.product_id = p2s.product_id AND p2s.store_id = '0')
LEFT JOIN `oc_review` r ON (r.product_id = p.product_id AND r.status = '1')
LEFT JOIN `oc_product_discount` pd2 ON (
pd2.product_id = p.product_id
AND pd2.customer_group_id = '1'
AND pd2.quantity = '1'
AND ((pd2.date_start = '0000-00-00' OR pd2.date_start < NOW())
AND (pd2.date_end = '0000-00-00' OR pd2.date_end > NOW()))
)
LEFT JOIN `oc_product_special` ps ON (
ps.product_id = p.product_id
AND ps.customer_group_id = '1'
AND in /www/wwwroot/wholesalejerseyzone.com/system/library/db/mysqli.php on line 41