insert into several databases

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
alexislalas
Forum Commoner
Posts: 44
Joined: Sun Feb 19, 2006 10:09 pm

insert into several databases

Post by alexislalas »

hey there.


i would like a user to register with only one form and have certain data inserted into 3 different databases.


i was thinking of having 3 sql querys for each insert, is that the way it is done?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Yes, I believe that you will have to use multiple queries.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Re: insert into several databases

Post by raghavan20 »

alexislalas wrote:hey there.


i would like a user to register with only one form and have certain data inserted into 3 different databases.


i was thinking of having 3 sql querys for each insert, is that the way it is done?
unless they are all same DBs and can have a replication.

else you can always have a 'on after insert' trigger to take the data to different DBs.
Post Reply