Welcome to WebmasterWorld Guest from 23.22.140.143

Forum Moderators: open

Message Too Old, No Replies

Merge Data Bases or Synchronize ?

Two scripts should have few fields identical.

     
2:04 pm on Jan 13, 2010 (gmt 0)

New User

5+ Year Member

joined:Jan 13, 2010
posts: 15
votes: 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.
Mircea.

3:29 pm on Jan 13, 2010 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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)

New User

5+ Year Member

joined:Jan 13, 2010
posts: 15
votes: 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)

New User

5+ Year Member

joined:Jan 13, 2010
posts: 15
votes: 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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 15, 2003
posts:2606
votes: 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.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members