0

I have no idea how to do this so please forgive my not trying before i ask. I would like to create a system that will allow user to vote, count and tell who won. i can do all that is stated. now i would like to add the functionality of having two database where one will be a real time back-up of the other. i do not know if its possible to have two "insert" statements, one inserting to one database and one the other. plan to use html for my interphace, mysql for the database and php to link the two. please help. titles of which books would be highly appreciated.

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by fobos
0

Google for "mysql replication" or "mysql master slave". If that functionality is not sufficient then code your own database abstraction layer in PHP so that each query which is not a SELECT statement is mirrored on a separate connection to the 2nd server.

0

If you want to insert data into 2 tables in the same database, then use UNION. If you have 2 databases, but same table name, 1) make sure you have the same fields, 2) use 2 connections for each database.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.