Requete sql sous php avec condition SVPPPPPP

Résolu
mehdi9833 Messages postés 88 Date d'inscription   Statut Membre Dernière intervention   -  
mehdi9833 Messages postés 88 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

voici ma requete toute simple qui me permet d'afficher le code rattaché, le libellé et le type rattache de mon produit sur le code produit selectionné. :

"SELECT article_rattach.strCodeRattach , article_rattach.strLibelleRattach , article_rattach.strTypeRattach FROM aff_article_rattach INNER JOIN article_rattach ON aff_article_rattach.strCodeRattach = article_rattach.strCodeRattach WHERE (aff_article_rattach.strCode)= '". $strCode ."'";

J'aimerais juste ajouté a ma requête qui marche parfaitement une condition, que le
type rattache (strTypeRattach) soit, soit une piéce soit un générique mais je n'y arrive pas même avec un and que je rajoute.

Merci d'avance
A voir également:

1 réponse

mehdi9833 Messages postés 88 Date d'inscription   Statut Membre Dernière intervention   4
 
c'est cool j'ai trouvé la solution, au début je mettais des " " mais en faites cest des ' ' quil faut mettre pour la condition.
voici la requete au cas où :

"SELECT article_rattach.strCodeRattach , article_rattach.strLibelleRattach , article_rattach.strTypeRattach FROM aff_article_rattach INNER JOIN article_rattach ON aff_article_rattach.strCodeRattach = article_rattach.strCodeRattach WHERE (aff_article_rattach.strCode)= '". $strCode ."' AND article_rattach.strTypeRattach = 'GENERIQUE' ";
0