Utulisation d'une table pour les jointure ( probleme )
bonjour,
je n'arrive pas a obtenir ce que je veut avec les jointures
tout d'abord, voici mes trois tables
( table partage, la troisieme qui est utulisé pour les jointures nommé partage )
1 table calend_cfg
Code:
1 2 3 4 5 6 7 8 9
|
CREATE TABLE `calend_cfg` (
`calend_ID` int(11) NOT NULL auto_increment,
`calend_lib` tinytext NOT NULL,
`calend_debut` int(11) NOT NULL default '0',
`calend_fin` int(11) NOT NULL default '0',
`postit` char(1) NOT NULL default '',
KEY `calend_ID` (`calend_ID`)
) TYPE=MyISAM AUTO_INCREMENT=18 ; |
1table membres
Code:
1 2 3 4 5 6 7 8 9 10
|
CREATE TABLE `membres` (
`ID` int(11) NOT NULL auto_increment,
`nom` tinytext NOT NULL,
`mail` tinytext NOT NULL,
`admin` char(1) NOT NULL default '',
`ajout_note_plan` char(1) NOT NULL default '',
`pass` text NOT NULL,
KEY `ID` (`ID`)
) TYPE=MyISAM PACK_KEYS=0 AUTO_INCREMENT=11 ; |
et une table Partage
Code:
1 2 3 4 5
|
CREATE TABLE `calend_partage` (
`ID` int(11) NOT NULL default '0',
`calend_ID` int(11) NOT NULL default '0'
) TYPE=MyISAM; |
ce que je voudrais c'est obtenir
stocké dans
membres-----membres-------calend_cfg
nom-----------ID--------------libelle
toto-----------1----------------Agenda perso de toto
toto-----------1----------------Evenements a venir
etc...
j'avais essayer cette requete ( qui ne me donne pas du tout le resultat voulu )
Code:
1 2 3 4 5
|
SELECT membres.ID,calend_cfg.calend_ID,nom,mail,admin,ajout_note_plan,calend_cfg.calend_lib AS libelle
FROM membres,calend_cfg
LEFT OUTER JOIN calend_partage
USING(calend_ID) |
voici un screenshot du resultat :
http://membres.lycos.fr/boumboum/SQL.JPG
merci de votre aide