Page 1 of 1
mysql_fetch_array(): issue
Posted: Tue Feb 20, 2007 10:38 am
by itsmani1
Code: Select all
<?PHP
$caRes = mysql_query("select * from catart") or die(mysql_error());
while($caRes = mysql_fetch_array($caRes))
{
print_r($caRes);
}
?>
i get this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in D:\Webspace\admins\addArticle.php on line 51
please help
Posted: Tue Feb 20, 2007 10:43 am
by volka
try
Code: Select all
$caRes = mysql_query("select * from catart") or die(mysql_error());
echo __FILE__,'@',__LINE__,': ', gettype($caRes);
while($caRes = mysql_fetch_array($caRes))
{
print_r($caRes);
}
Posted: Tue Feb 20, 2007 10:46 am
by itsmani1
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
this is the result.
Posted: Tue Feb 20, 2007 10:48 am
by volka
and the echo was ignored or did not print anything? Or has the code snippet you showed us maybe, just maybe nothing to do with the message you get?