I have a code that places some data into a MySQL database table. The first field is an auto increment interval. How can I find the highest interval in this feild from php so I can use the ID in the code as well. Also how can I select a row from the table with the ID I want using the id.
I'm very new to this. Thanks.
Also you may want to know why I want to know:
mysql_connect("localhost","root","********");
@mysql_select_db(subbmission) or die( "There has been an error in your request. Please try again! Error: Unable to select database.");
$query="INSERT INTO pending VALUES ('','$title','$email','$date','$article','$General','$Funny','$Help','$Quiz','$Chat','$Game')";
$result = mysql_query($query);
mysql_close();
if($result){
$subject = "New article submission - " . $title;
$body = "Below is a new article. visit <a herf=\"http://www.godofgod.co.uk/newssub/newsapprove.php?id=" . $id . "\"></a>" . $article . $General . $Funny . $Help . $Quiz . $Chat . $Game;
mail('godofgod@godofgod.co.uk',$subject,$body,"From: $email\n");
See I need the ID for another script I will make and I will need to know how to use the ID with the new script.