PDO's lastInsertId for MySQL a race condition?

后端 未结 2 1577
长情又很酷
长情又很酷 2021-01-26 04:36

I\'m writing a PHP class file which pushes data to a MySQL database using PDO. Essentially the file gets hit many times very quickly (creating a new instance of the class each t

2条回答
  •  时光取名叫无心
    2021-01-26 04:58

    The issue turned out to be that Chromium's built-in console's network tab does not show the correct information. Showing the ID via console.log() works as expected, and using FireBug for Firefox shows the network activity as expected. I was working under the assumption that the network tab would show the actual network activity, which it does not always.

提交回复
热议问题