I have this code:
- Code: Select all
$sql = "SELECT game_id, rival_id, result, h_a, UNIX_TIMESTAMP(datum) AS datum FROM game ORDER BY datum ASC";
$result = mysql_query($sql, $db) or die(mysql_error($db));
if(mysql_num_rows($result) > 0)
{
echo '<table>';
echo '<tr><td>Dátum</td><td>Domáci</td><td>Hostia</td><td>Výsledok</td></tr>';
while($row = mysql_fetch_array($result)) //at this line is the warning
{
extract($row);
It writes me this error: "Warning: mysql_fetch_array() expects parameter 1 to be resource, string given in H:\xampp\htdocs\rozpis.php on line 18"
I can't find problem in this code. Do you know what is bad? Thank you for reply.



