Affichage de liste d'un tableau

biper -  
amjahed Messages postés 350 Statut Membre -
Bonjour,
je cherche sans succès depuis quelques temps à trouver une solution à mon problème.
Alors j'ai 6 tables et je veus afficher une liste dans un tableau.J'ai mis en place un code dont le serveur MSQL n'affiche aucune erreur, mais malheuresement il n'ya pas d'affichage. Je sais pas pourquoi. Pour cela voici le Code:

<?php
include("db.php");
$r="SELECT ds.dmd_cod, po.postul_nom, po.postul_pren, fo.format_lib, re.recom_nom, re.recom_pren, ts.date_debut_stage, ts.date_fin_stage, ls.lieu_stage_nom, ds.durée
FROM demande_stage ds, appartient_a ap, postulant po, concerne co, formation fo, recommandeur re, type_stage ts, lieu_stage ls, stage st
WHERE ds.dmd_cod = ap.dmd_cod
AND ap.postul_cod = po.postul_cod
AND ds.dmd_cod = co.dmd_cod
AND co.format_cod = fo.format_cod
AND ds.recom_cod = re.recom_cod
AND ds.stage_cod = st.stage_cod
AND st.lieu_stage_cod = ls.lieu_stage_cod
AND st.typstage_cod = ts.typstage_cod";
$req=mysql_query($r,$c);
$requete = mysql_query($r,$c) or die('Erreur SQL !<br>'.$r.'<br>'.mysql_error());
while($row = mysql_fetch_array($req,$c)){
$a = substr($row['date'], 0, 4); // conversion
$m = substr($row['date'], 5, 2); // de la date
$j = substr($row['date'], 8, 2); // au format
$date = $j.'-'.$m.'-'.$a; // Français
echo'
<tr>
<td>'.$row['dmd_cod'].'</td>
<td>'.$row['postul_nom'].'</td>
<td>'.$row['postul_pren'].'</td>
<td>'.$row['format_lib'].'</td>
<td>'.$row['recom_nom'].'</td>
<td>'.$row['recom_pren'].'</td>
<td>'.$row['date_debut_stage'].'</td>
<td>'.$row['date_fin_stage'].'</td>
<td>'.$row['lieu_stage_nom'].'</td>
<td>'.$row['durée'].'</td>
</tr>';}
mysql_close();
?>
A voir également:

1 réponse

amjahed Messages postés 350 Statut Membre 123
 
Salut,
Une raison probable simple : il n'y a pas de résultat à afficher !
Proposition : Utiliser phpMyAdmin (Ou un autre utils) pour tester votre requête.
-1