Re: requete

Posté par Zechatdoc le 18/12/2007 10:59:11
Il te faut faire 2 jointures sur ton fichier ville :

SELECT
Fournisseur.Nom_Frs AS Nom,
Fournisseur.Commantaire_frs AS Commantaire,
Fournisseur.SIREN_frs AS SIREN,
Ville1.Nom_ville AS ville,
Ville1.code_postal AS cp,
Ville1.Adresse AS Adresse,
Ville1.Pays AS Pays,
Contact_Prest.Nom_contact AS Nomcontact,
Contact_Prest.Prenom_contact AS Prenomcontact,
Contact_Prest.E_mail_contact AS Emailcontact,
Contact_Prest.Fax_contact AS Faxcontact,
Contact_Prest.Tel_contact AS Telcontact,
Contact_Prest.Commentaire_prest AS Commentaireprest,
Ville2.Nom_Ville AS Ville_Prest
FROM
Ville AS Ville1,
Ville AS Ville2
Fournisseur,
Contact_Prest
WHERE
Ville1.IDVille = Fournisseur.IDVille
AND Contact_Prest.IDFournisseur = Fournisseur.IDFournisseur
AND Ville2.IDVille = Contact_Prest.IDVille

Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=17&topic_id=5581&post_id=22890