
you get the last insert id based on your connection, and concurrent operations will have different connections, so the case of mixed up keys wont happen. A more real concern though would be if your insert fails, this would mean that getting the last id would fetch the last successful insert on that connection and use it On Wed, Jan 19, 2011 at 3:05 PM, James Nzomo <kazikubwa@gmail.com> wrote:
Locking may be a good option but the performance to integrity tradeoff ..... Locking might also frustrate users when trying to insert
Anyway, I think i'll use a different way of getting the primary key other than relying on the last insert Or maybe employ the use of a surrogate key
I'll research on the matter then share the best solution in my view
_______________________________________________ Skunkworks mailing list Skunkworks@lists.my.co.ke http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------ Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke