1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
| public function consultationNSession($nsession){
//affichage de la table client
$query="SELECT reservation.nom,reservation.prenom,client.telephone,reservation.observation FROM reservation,client where reservation.nom=client.nom AND reservation.prenom=client.prenom AND nsession=".$nsession." AND jour='".mardimatin."';";
//$query="SELECT nom,prenom FROM reservation where nsession=".$nsession.";";
//Test pour voir si $query existe sur la base avec la connexion connexionID
$result= mysql_query ($query, $this->connexionId );
if(!$result){
echo "erreur d'affichage liste clients !!!! ";
}
else{
include 'index.php';
echo'<td>N Session '.$nsession.'</td>';
echo'<tr>';
echo '<table width="400" border="1" cellspacing="5" cellpadding="0">';
echo'<td>MARDI MATIN</td>';
// affichage des champs clients
for ($i=0 ; $i<mysql_num_fields($result); $i++){
echo '<tr>';
echo '<b>'.' '.mysql_field_name($result,$i).' '.'</b>';
echo '</tr>';
}
// affichage de la table client
while ($row = mysql_fetch_array($result) ) {
echo '<tr>';
for ($i=0 ; $i<count($row); $i++){
echo '<td>'.$row[$i].'</td>';
}
echo '</tr>';
}
echo '</table>';
} |