Jump to content

Sequence of delete records


sunilpaladugu

Recommended Posts

Hi all

I have to maintain synchronization between two databases

for that i need the script for the fallowing

 

I have a table in db1.student 

 

I have a table in db2.student

 

structure and data of both databases are same

 

Now I need a php script to

 

If I am deleting any of rows of data in db1.student that should be deleted from the db2.student also

 

This is not work with mysql triggers because both databases are residing on different hosts and they don't have 24/7 connection

.....

When I get the connection between them I have to run the PHP script

 

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/229451-sequence-of-delete-records/
Share on other sites

Wouldn't it be best to set up a master and a slave?

 

When you insert/update/delete records, you send the query to the master, it runs the query then sends the same query to the slave.

When you select, it grabs it from either the master or the slave, doesn't matter.

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.