";
}
}
else echo "Erreur
\n";
}
function print_header($fields)
{
echo "\n
\n";
for ($i=0; $i< count($fields); $i++) {
if (isset($_GET["order"]) && ($_GET["order"] == $fields[$i]))
echo "".$fields[$i]." | ";
else
echo "".$fields[$i]." | ";
}
echo "\n
\n";
}
function print_result($res, $fields) {
while ($line = mysql_fetch_row($res)) {
echo "\n";
for ($i=0; $i".$line[$i]."";
} else {
echo "".$line[$i]." | ";
}
}
echo "
";
}
}
function print_request($res, $fields)
{
if ($res) {
if (mysql_num_rows($res) == 0) {
echo " pas de resultat!
\n;";
} else {
echo " ".mysql_num_rows(res)." personnes satifont votre requête
\n";
echo "\n";
print_header($fields);
print_result($res, $fields);
echo "\n
";
}
}
else echo "Erreur\n";
}
?>
Interrogation de table
Affichage d'une table
Recherche
Resultat