Duplicate data accross 2 mysql databases on seperate servers
Posted: Mon Jun 13, 2005 11:40 pm
I was hoping someone out there would be able to shed some light on a problem that I have.
Both dB's are MySQL.
I have a banner table on one server that has an autoincement primary key on one server and I would like to update/insert/delete data on another server with seperate calls.
The table is duplicated with the same name on the second server and the key is simply set to the same data type as the original database except that autoincrement has been turned off.
So when I do an insert into the "auto-inc" database, how do I get the key for the record that I just inserted at that moment? -- so that I may pass it to the other database for a seperate insert...
I will use the key for updates and deletes so the key should be the same if I can...
Any help would be appreciated,
Thx.
Both dB's are MySQL.
I have a banner table on one server that has an autoincement primary key on one server and I would like to update/insert/delete data on another server with seperate calls.
The table is duplicated with the same name on the second server and the key is simply set to the same data type as the original database except that autoincrement has been turned off.
So when I do an insert into the "auto-inc" database, how do I get the key for the record that I just inserted at that moment? -- so that I may pass it to the other database for a seperate insert...
I will use the key for updates and deletes so the key should be the same if I can...
Any help would be appreciated,
Thx.