izzysanime
09-26-2008, 04:10 PM
HI,
I'm trying to get the highest number from a table, but it brings back "resource ID #3". I have no idea where that comes from, because there is no resource id #3 or even 3 colums. Here is my code
mysql_select_db("mvy_fomcreds") or die(mysql_error());
$data = mysql_query("SELECT annon FROM `annon` ORDER BY `annon` DESC LIMIT 1")
or die(mysql_error());
$new = $annon + $data;
mysql_select_db("mvy_fomcreds") or die(mysql_error());
mysql_query("INSERT INTO `annon` (`annon`) VALUES ('$new');
");
Print "Thank you for your submission.";
echo "$data";
?>
Thanks,
Josh
I'm trying to get the highest number from a table, but it brings back "resource ID #3". I have no idea where that comes from, because there is no resource id #3 or even 3 colums. Here is my code
mysql_select_db("mvy_fomcreds") or die(mysql_error());
$data = mysql_query("SELECT annon FROM `annon` ORDER BY `annon` DESC LIMIT 1")
or die(mysql_error());
$new = $annon + $data;
mysql_select_db("mvy_fomcreds") or die(mysql_error());
mysql_query("INSERT INTO `annon` (`annon`) VALUES ('$new');
");
Print "Thank you for your submission.";
echo "$data";
?>
Thanks,
Josh