homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

Merge Data Bases or Synchronize ?
Two scripts should have few fields identical.

 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.



 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?


 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.


 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 ?


 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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved