Page 1 of 1

php mysql_fetch_array error

Posted: Mon Aug 03, 2009 6:02 am
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 :?:

Re: php mysql_fetch_array error

Posted: Mon Aug 03, 2009 6:12 am
by lordrt
Sorry for the trouble but solved it, should have commented the

Code: Select all

into /*$fid*/
as

Code: Select all

/*into $fid*/