$result = mysql_query ($query)
or die ("Query failed");
$i = mysql_num_rows ($result);
mysql_data_seek ($result, $i); // this makes it jump to the last record
All this is from the PHP documentation / mysql functions!
I did not type one letter of this code; just copy / paste !
Sometimes, RTFM
HTH,
JJ Mouris