user2711681
user2711681

Reputation: 275

Multiple db updates within one transaction using mysqli

We have a scenario where we a local db and for each db we have a copy in the hq server and also hq db. What we are wondering here is how best to solve the problem when we have to do an insert or update on the local db to be reflected on both the hq db and local copy db in the hq server. We are using php codes and mysql db in linux environment.

Upvotes: 0

Views: 63

Answers (1)

Serhat Akay
Serhat Akay

Reputation: 534

Maybe you can use replication to overcome your problem.

http://dev.mysql.com/doc/refman/5.1/en/replication.html

You will let say insert into your master and slaves will get the same data in seconds.

Upvotes: 1

Related Questions