Is it possible to know which last row was inserted into a MySql table where the primary key is not sequential?
I have a table where the primary key is made up of two columns that are FK, so they do not follow a sequence.
When executed the query select last_insert_id();
is returned 0 (It makes sense, because no ID has been entered anyway).
The best way out is to put a same ID column?