Jump to content

mysql_insert_id in a Master Slave setup


girish.kc

Recommended Posts

Hi, I am planning to use a Master Slave setup in MySQL database. My concern is can I use the "mysql_insert_id()" function to get the recently inserted ID? Does it uses the "Select" query to get the latest inserted ID?

In that case my query may fail because, the insert query will be fired at master DB, but the select to slave DB. And there may be some delay in the replication.

 

Need help ..

Link to comment
https://forums.phpfreaks.com/topic/210317-mysql_insert_id-in-a-master-slave-setup/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.