Here is the query ...
select vd.vendor_id, vd.title, vd.tax, v.vtotal, vs.country_id, vs.zone_id, c.commission from oc_vendor_discount vd, oc_vendor v, oc_vendors vs, oc_commission where v.vproduct_id = '" . (int)$product['product_id'] . "' and vs.vendor_id = v.vendor and c.commission_id = vs.commission_id
It gives a syntax error, but what I have no idea, that's right! Help me understand what a mistake!
Mistake ...
Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT vd.vendor_id, vd.title, vd.tax, v.vtotal, vs.country_' at line 1 Error No: 1064 SELECT vd.vendor_id, vd.title, vd.tax, v.vtotal, vs.country_id, vs.zone_id, c.commission FROM oc_vendor_discount vd, oc_vendor v, oc_vendors vs, oc_commission WHERE v.vproduct_id = '47' AND vs.vendor_id = v.vendor AND c.commission_id = vs.commission_id in
oc_commission
oc_commission line tooc_commission c
. - Visman