Think about Loose Coupling | |
PerlMonks |
SELECT LAST_INSERT_ID does not workby Vagabundo (Initiate) |
on Jun 28, 2017 at 04:49 UTC ( [id://1193750]=perlquestion: print w/replies, xml ) | Need Help?? |
Vagabundo has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I have two scripts using the same mysql-database with DBI and the same table. One of this scripts add sometimes a lot of inserts. The other script than has a problem to get the correct LAST_INSERT_ID. It looks like the busy script makes entries at the same time between my Insert and my SELECT LAST_INSERT_ID. Is that real possible and how can I prevent it. My Code is: for example: The auto_increment entry is 2201 and the last_insert is 2203 or 2504 and 2505 and so on..... Has anybody an idea for an solution?
Back to
Seekers of Perl Wisdom
|
|