Bonjour
Je voudrai faire une requete qui face directement un test dans la requete de si la valeur existe.
Je m'explique .. voici l'idée de la requete:
Les 2 lignes
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 SELECT o.*,pm.type AS paymonthly_type, pm.id AS paymonthly_id,pm.name AS paymonthly_name, pm.hat AS paymonthly_hat, pm.intro AS paymonthly_intro, t.id AS terminal_id,t.name AS terminal_name, t.proPrice AS terminal_proPrice, t.enterprisePrice AS terminal_ePrice, t.releasePrice AS terminal_rPrice, t.image AS terminal_image, t.intro AS terminal_intro, t.hat AS terminal_hat'. ' FROM #__ps_offer AS o INNER JOIN jos_ps_discount AS d1 ON d1.id = o.discountID1 INNER JOIN jos_ps_discount AS d2 ON d2.id = o.discountID2 WHERE o.id = '.$this->_oidpeuvent exister ou non ... comment je peux dire "si o.discountID1 n'existe pas alors ne pas faire la requete 'INNER JOIN jos_ps_discount AS d1 ON d1.id = o.discountID1'".
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 INNER JOIN jos_ps_discount AS d1 ON d1.id = o.discountID1 INNER JOIN jos_ps_discount AS d2 ON d2.id = o.discountID2
Merci d'avance de votre aide![]()
Partager