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
|
<?php
$bd=mysql_connect("serveur","identifiant","motdepasse");
if (!$bd) die ("La connexion a échoué !");
$ok = mysql_select_db("mabase");
if (!$ok)
{die("Impossible d'accéder à la base mabase");}
if(mysql_errno())
{die("<br>". mysql_errno(). ": ".mysql_error()."<br>");
}
$requete = "SELECT id,nom,prenom,resultat
FROM table_evaluations
WHERE id > '0'
ORDER BY resultat DESC, nom";
$r = mysql_query($requete);
echo "<br>".$r;
mysql_close();
if (mysql_errno())
{
die("<br>". mysql_errno()." : ". mysql_error()."<br>");
}
?> |