Welcome to WebmasterWorld Guest from 184.108.40.206 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
Merge Data Bases or Synchronize ? Two scripts should have few fields identical. mircea1st msg:4059839 2:04 pm on Jan 13, 2010 (gmt 0) I am putting together a site made out of two scripts, with users.
The 2 scripts have info about the members , they will act as one site so I need the users info to be the same on both. When the user fills in the info on the DB1 they should appear in the DB2 as well.
The information fields I would need the same are basic: name, email, phone , website. The edit menu on the second script will be removed, so users can not change data on DB2. So data can come to DB2 only from DB1.
Both databases are on the same Mysql server.
Thanks a lot to all willing to help.
Demaestro msg:4059906 3:29 pm on Jan 13, 2010 (gmt 0)
May I ask why you need 2 databases if they are going to store identical information?
Can't the 2 scripts use the same db?
mircea1st msg:4059999 5:04 pm on Jan 13, 2010 (gmt 0)
The scripts are entirely different so are the databases , i only need few basic fields to be the same. mircea1st msg:4061653 8:55 pm on Jan 15, 2010 (gmt 0)
Is it a better ideea to send info to both databases when users signup ? Is it possible ? Demaestro msg:4061663 9:09 pm on Jan 15, 2010 (gmt 0)
Yes you can send the info to both DBs when the user signs up.
All you would need is 2 connection strings.
So where you create your connection in code you create a 2nd connection to the 2nd database and then when you execute the insert script just have the SQL execute on both connection objects.