|
Salut à tous,
Malgré avoir regardé des explications sur plusieurs pages, je n'arrive pas à trouver d'où vient le problème qui me donne toujours la même erreur : Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in test.php on line 17
Voici le code :
<html>
<head>
<title>Trier</title>
<head>
<body>
<table border="1" cellpadding="0" cellspacing="0">
<tr>
<th>Nom</th>
<th>Email</th>
</tr>
<?php
mysql_connect('localhost','root','') or die ("erreur de connexion");
mysql_select_db('rotaract_france') or die ("erreur de connexion base");
$result = mysql_query("SELECT nom,email FROM websites ORDER ASC BY nom");
mysql_close();
while($row = mysql_fetch_row($result))
{
$Nom = $row[1];
$Email = $row[2];
echo "<tr>\n
<td>$Nom</td>\n
<td>$Email</td>\n
</tr>\n";
}
?>
</tr>
</table>
</body>
</html>
|