note 31544 added to function.mysql-fetch-array
| From: | the_borris at hotmail dot com | Date: | Fri, 25 Apr 2003 12:58:22 +0000 |
| Subject: | note 31544 added to function.mysql-fetch-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-47077@lists.php.net to get a copy of this message | ||
i am using this exact code ...
<?
$user = "borris";
$db = mysql_connect("localhost","user","pass");
mysql_select_db("borris_db",$db);
$result = mysql_query("SELECT * FROM members WHERE user =
'".$user."'",$db);
while($myrow = mysql_fetch_array($result))
{
echo $myrow["pass"];
}
?>
... and getting this exact error
Warning: Supplied argument is not a valid MySQL result resource in e:\websites\borris\test.php on
line 6
what am i doing wrong?
the error seems to be with the mysql_fetch_array statement
--
http://www.php.net/manual/en/function.mysql-fetch-array.php
http://master.php.net/manage/user-notes.php?action=edit+31544
http://master.php.net/manage/user-notes.php?action=delete+31544
http://master.php.net/manage/user-notes.php?action=reject+31544