php mysql_fetch_array error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lordrt
Forum Commoner
Posts: 34
Joined: Sun Jul 19, 2009 11:44 pm

php mysql_fetch_array error

Post by lordrt »

Code: Select all

$query4 = mysql_query("select max(fid) into /*$fid*/ from files");
         $row4 = mysql_fetch_array($query4, MYSQL_BOTH);
         $fid = $row4['max'];
I am executing the above code from a php script but getting the following error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /var/www/html/php_import_article.php on line 53
Can anyone help me with this :?:
lordrt
Forum Commoner
Posts: 34
Joined: Sun Jul 19, 2009 11:44 pm

Re: php mysql_fetch_array error

Post by lordrt »

Sorry for the trouble but solved it, should have commented the

Code: Select all

into /*$fid*/
as

Code: Select all

/*into $fid*/
Post Reply