Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.