i'm trying to check if there is a number in my table and if there is up it the number and check again.. but there is something wrong with my code..
$newsid = mysql_num_rows(mysql_query("SELECT * FROM news"));
$checkid = mysql_query("SELECT newsid FROM news WHERE newsid='$newsid'");
i want to get the id from the number of rows. and then check if there is already an id of that number, this happens when a row is deleted from the table. so we count the rows and keep adding 1 until we have a number that is already used (and perferably larger than the old id's).
so here is my problem, $checkid is returning Resource ID #4... what is that supposed to mean? is it a syntax error (thats not being caught by php)? or something else?
thanks.