Précédent   Forum des professionnels en informatique > PHP > PHP & SGBD
PHP & SGBD Forum d'entraide sur les SGBD avec PHP. Avant de poster : FAQ BDD, toutes les FAQ PHP, cours BDD et sources BDD
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 29/01/2007, 00h24   #1
Nouveau Membre du Club
 
Inscription : mars 2006
Messages : 66
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 66
Points : 39
Points : 39
Par défaut [SQL] SELECT jointure 7 Tables

Salut ma requete , marche mais ne me renvoi pas d'enregistrement

Citation:
SELECT gp_fiches.NUMFICHE, gp_fiches.DATECREATION, gp_fiches.NOM, gp_fiches.PRENOM, gp_fiches.DATENAISSANCE, gp_fiches.LIEUNAISSANCE, gp_fiches.ADRESSE, gp_fiches.TELFIXE, gp_fiches.TELGSM, gp_fiches.FAX, gp_fiches.EMAIL, gp_fiches.CIN, gp_fiches.FORMATIONAUTREDESCRIPTION, gp_fiches.PROJETNATURE, gp_fiches.PROJETFINAN_CREDIT, gp_fiches.PROJETFINAN_PESO, gp_fiches.PROJETCOUT, LIBVILLE, LIBSITUACTU, LIBORIGINE, LIBCARRIERE, LIBSECTA, LIBTYPEETATPROJET, LIBPHASEPROJET
FROM gp_fiches, gp_tb_villes, gp_tb_originecontact, gp_tb_situationactu, gp_tb_typecarriere, gp_tb_secteuractivite, gp_tb_etatstypes, gp_tb_phase_projet
WHERE gp_fiches.NUMFICHE =1
AND gp_tb_villes.IDVILLE = gp_fiches.VILLE
AND gp_fiches.SITUATIONACTUELLE = gp_tb_situationactu.ID_SIT
AND gp_tb_originecontact.ID_ORIGINE = gp_fiches.ORIGINE
AND gp_tb_typecarriere.ID_TYPECAR = gp_fiches.CARRIEREPROFANNEE
AND gp_tb_secteuractivite.ID_SECT = gp_fiches.PROJETID_SECT
AND gp_tb_etatstypes.ID_TYPEETATP = gp_fiches.PROJETID_TYPEETATP
AND gp_tb_phase_projet.ID_PHASEPROJET = gp_fiches.PROJETID_PHASE
la jointure et correcte ou pas ?
php4life est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/01/2007, 02h19   #2
Nouveau Membre du Club
 
Inscription : mars 2006
Messages : 66
Détails du profil
Informations forums :
Inscription : mars 2006
Messages : 66
Points : 39
Points : 39
Par défaut c bon g trouvé

slt voila c bon j'ai trouvé c mieux comme ca :
Citation:
SELECT NUMFICHE, DATECREATION, NOM, PRENOM, DATENAISSANCE, LIEUNAISSANCE, ADRESSE, TELFIXE, TELGSM, FAX, EMAIL, CIN, FORMATIONAUTREDESCRIPTION, PROJETNATURE, PROJETFINAN_CREDIT, PROJETFINAN_PESO, PROJETCOUT, LIBVILLE,LIBORIGINE,LIBSECTA,LIBSITUACTU,LIBCARRIERE,LIBTYPEETATPROJET,LIBPHASEPROJET

FROM gp_fiches
LEFT JOIN gp_tb_villes ON ( gp_tb_villes.IDVILLE = gp_fiches.VILLE )
LEFT JOIN gp_tb_originecontact ON ( gp_tb_originecontact.ID_ORIGINE=gp_fiches.ORIGINE)
LEFT JOIN gp_tb_secteuractivite ON ( gp_tb_secteuractivite.ID_SECT=gp_fiches.PROJETID_SECT)
LEFT JOIN gp_tb_situationactu ON (gp_fiches.SITUATIONACTUELLE=gp_tb_situationactu.ID_SIT)
LEFT JOIN gp_tb_typecarriere ON (gp_tb_typecarriere.ID_TYPECAR=gp_fiches.CARRIEREPROFANNEE)
LEFT JOIN gp_tb_etatstypes ON ( gp_tb_etatstypes.ID_TYPEETATP=gp_fiches.PROJETID_TYPEETATP)
LEFT JOIN gp_tb_phase_projet ON ( gp_tb_phase_projet.ID_PHASEPROJET=gp_fiches.PROJETID_PHASE)

WHERE NUMFICHE = '1'
LIMIT 0 , 30
une remarque p etre ?
ciao
php4life est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 29/01/2007, 09h38   #3
Expert Confirmé

 
Avatar de Amara
 
Inscription : juillet 2004
Messages : 2 684
Détails du profil
Informations personnelles :
Localisation : France, Sarthe (Pays de la Loire)

Informations forums :
Inscription : juillet 2004
Messages : 2 684
Points : 2 910
Points : 2 910
Oui, comme il n'y a aucun rapport avec PHP tu n'es pas dans le bon forum, poste dans un forum SGBD et tu auras sûrement des réponses plus fiables...
http://www.developpez.net/forums/f4/bases-donnees/
__________________
Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)
Amara est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 01h08.


 
 
 
 
Partenaires

Hébergement Web