Close but not correct.
This will fetch the last inserted record, not the last record inserted by you
The difference:
When you open a connection and insert a record, the ID of that record is stored
for your database connection and can be fetched by mysql_insert_id().
This means that no matter how many records other people insert after your insert, you will allways see the id of the last record inserted by on your database connection.
The method that you just posted fetches the last record inserted into the table.
that means that if somebody else inserts a record while you are running this query, you will get that record, insertead of the record you inserted.