MySQL Query --- Warning...
Posted: Thu Nov 16, 2006 8:57 pm
How come this code always gives me
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/i4boredo/public_html/uploadimgs.php on line 13
Code: Select all
//starts line 11
$new = mysql_query("INSERT INTO `pictures` (userid) VALUES (".$userid.")");
$get = mysql_query("SELECT * FROM `pictures` WHERE `userid`=". $userid ." ORDER BY `pictureid` LIMIT 1 DESC");
$nextfile = mysql_fetch_array($get);
$nextfile = $nexfile['pictureid'];
$filename = $nextfile;
$filename_s = $filename.'_s';
$filename_m = $filename.'_m';