note 32765 rejected from function.mysql-fetch-array by alindeman
| From: | alindeman@php.net | Date: | Fri, 06 Jun 2003 12:35:35 +0000 |
| Subject: | note 32765 rejected from function.mysql-fetch-array by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49854@lists.php.net to get a copy of this message | ||
Note Submitter: dbrock@cogeco.ca
----
<?php
include("db.php");
$db = mysql_select_db($db_name) or die("Couldn't select database.");
$sql = "SELECT * FROM matches ORDER BY id DESC";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
{
$opponent = $row['opponent'];
$map = $row['map'];
$result = $row['result'];
$score = $row['score'];
$league = $row['league'];
$id = $row['id'];
?>
<table width="403" border="0" cellpadding="0"
cellspacing="1">
<tr>
<td width="124"> <div align="center"><? echo
$opponent; ?></div></td>
<td width="67"> <div align="center"><? echo $map;
?></div></td>
<td width="52"> <div align="center"><? echo $score;
?></div></td>
<td width="65"> <div align="center"><? echo
$result; ?></div></td>
<td width="89"> <div align="center"><? echo
$league; ?></div></td>
</tr>
</table>
<?php
}
?>
Why does this give me the error: Warning: mysql_fetch_array(): supplied argument is not a valid
MySQL result resource in /home/lurkem/public_html/matches2.php on line 71