Ciao a tutti,
ecco qui il mio errore:
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\seriea\clasgira.php on line 11
Warning: mysql_fetch_row() expects parameter 1 to be resource, null given in C:\xampp\htdocs\seriea\clasgira.php on line 17
Questo è il codice:
<?php
require ("../database.php");
error_reporting (E_ALL ^ E_NOTICE);
mysql_error();
$query = mysql_num_rows(mysql_query("Select * nome, punti, giocate, vinte, pareggiate, perse from gironea order by punti DESC"));
echo "
<table style='width: 450px; text-align: center; height:300px;' ><tr><td>#[/b]</td><td>Squadra</td><td>Punti</td><td>Giocate</td><td>Vinte</td><td>Pareggiate</td><td>Perse</td></tr>";
for($i = 1; $i < 11; $i++ ) {
$dati = mysql_fetch_row($query);
echo "<tr><td>$i</td><td>$dati[0]</td><td>$dati[1]</td><td>$dati[2]</td><td>$dati[3]</td><td>$dati[4]</td><td>$dati[5]</td></tr>";
}
echo "</table>";
?>
Grazie in anticipo![]()