Ma jointure fonctionne pourtant car je sais récupérer les autres champs stockés dans les tables
Voici comment je procède :
// On sélectionne tous les enregistrements dans la table principale avec jointure sur la table photo avec id correspondante
// $max est la requete de pagination $max=LIMIT...
$req_main="SELECT * FROM $CfgTableMain LEFT JOIN $CfgTablePhotos ON ($CfgTableMain.gallery_id = $CfgTablePhotos.gallery_id) GROUP BY $CfgTableMain.gallery_id ORDER BY $CfgTableMain.gallery_date DESC $max";
$res_main=mysql_query($req_main) or die(mysql_error());
while ($row = mysql_fetch_array ($res_main)) {
echo 'Gallerie: '.$row['gallery_id'];
}
Comment puis-je récupérer l'id de ma gallerie (id stockée dans $CfgTableMain) ??echo 'Gallerie: '.$row['gallery_id']; ne renvoi pas l'id.
Merci pour votre aide,
Raph