Maybe you want to know what was the last inserted record to the database. Add this straight after the MySQL statement.
1 2 3 4 5 |
$inserted_row_id = mysql_insert_id(); mysql_query("DELETE FROM reports WHERE id <> {$inserted_row_id} ") or die(mysql_error()); |