Welcome to WebmasterWorld Guest from 54.159.44.227

Forum Moderators: open

Message Too Old, No Replies

Merge Data Bases or Synchronize ?

Two scripts should have few fields identical.

     

mircea1st

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

5+ Year Member



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.

Demaestro

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

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

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

5+ Year Member




The scripts are entirely different so are the databases , i only need few basic fields to be the same.

mircea1st

8:55 pm on Jan 15, 2010 (gmt 0)

5+ Year Member



Is it a better ideea to send info to both databases when users signup ?
Is it possible ?

Demaestro

9:09 pm on Jan 15, 2010 (gmt 0)

WebmasterWorld Senior Member demaestro is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month