See also: mysql_query(), mysql_num_rows().
?php $link = mysql_pconnect ("kron", "jutta", "geheim") {or die ("Connexion impossible");} mysql_select_db ("samp_db") {or die ("Sélection de base impossible");} $query = "SELECT last_name, first_name FROM friends"; $result = mysql_query ($query) {or die ("Requête impossible");} / / récupère les lignes dans l'ordre inverse for ($i = mysql_num_rows ($result) - 1; $i =0; $i- -) {if (!mysql_data_seek ($result, $i)) {echo "Impossible d'atteindre la ligne $i\n"; continue;} if( !($row = mysql_fetch_object ($result))) continue; echo "{$row - last_name} {$row - last_name$row - first_name} br \n";} mysql_free_result ($result);?