note 32765 added to function.mysql-fetch-array
| From: | dbrock at cogeco dot ca | Date: | Fri, 06 Jun 2003 04:24:57 +0000 |
| Subject: | note 32765 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49842@lists.php.net to get a copy of this message | ||
<?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
----
Manual Page -- http://www.php.net/manual/en/function.mysql-fetch-array.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32765
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32765&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32765&report=yes