DonaLH Posted January 27, 2017 Share Posted January 27, 2017 (edited) Bonjour, J'aimerais ajouté une colonne qui intégrera le prix de vente HT de chaque produit à ma requête SQL. Voici ma requête SQL actuelle : select hb.CODE_ID, hb.id_product , hb.Reference_DIROBOTS, hb.Designation, hb.Declinaison,hb.Fournisseur, hb.Reference_Fournisseur , psps.product_supplier_price_te as Prix_Fournisseur,IF(psps.id_currency=1,'€','$') as Monaie,hb.Commande_Fournisseur, hb.Commande_Client , hb.QT_Prestashop as QT_reel from Inventaire_HB as hb left join ps_product_supplier as psps on (psps.id_product=hb.id_product and psps.`id_product_attribute` =hb.id_product_attribute and hb.`id_supplier`=psps.`id_supplier`) Quelqu'un serait comment faire ? Merci ! EDIT : C'est bon j'ai trouvé ! C'est ça : select hb.CODE_ID, hb.id_product , hb.Reference_DIROBOTS, hb.Designation, hb.Declinaison,hb.Fournisseur, hb.Reference_Fournisseur , psps.product_supplier_price_te as Prix_Fournisseur,IF(psps.id_currency=1,'€','$') as Monaie, hb.Commande_Fournisseur, hb.Commande_Client , hb.QT_Prestashop as QT_reel , psp.price as Prix_HT from Inventaire_HB as hb left join ps_product_supplier as psps on (psps.id_product=hb.id_product and psps.`id_product_attribute` =hb.id_product_attribute and hb.`id_supplier`=psps.`id_supplier`) left join ps_product as psp on (psp.id_product=hb.id_product and hb.`id_supplier`=psp.`id_supplier`) Edited January 27, 2017 by DonaLH (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now