How do I get the ID of the last updated row in MySQL using PHP?
No need for so long Mysql code. In PHP, query should look something like this:
$updateQuery = mysql_query("UPDATE table_name SET row='value' WHERE id='$id'") or die ('Error'); $lastUpdatedId = mysql_insert_id();