Hi All
I am just a newbie and have a question about using more than one database to store data for one site PHP.
This includes some pages on the site needing to access and also insert data in to both of the data bases.
This is why I need to do this. I am using a program that creates one of my databases the problem. ( I have not control over this program) I need to add extra tables and fields to the database. for some additional data.
The program that creates the data base is a little unstable and sometime will recreate the database tables & fields and re-populate all the fields with my data. Thus deleting my added tables, fields and extra data.
I started to think that I would just create a second database storing all of my tables and fields that the program dose not create. This way it could not delete any on my data as its no in the same database.
The tables in each data base do not share the same data except for a TxnID this way I can select a transaction from the program created database then select my additional information on the same transaction I have stored in the other data base.
In a way you could say this is just splitting a database in to two databases on different servers.
My problem is I am not 100% of the best way to do this. I did try to have two database connections in the same include file but got errors. I then put each connections in to its own include file. Now this worked a little, I can still get my data from one database or the other but not the both of them on the same page.
I have looked all over the net for information on using two databases with the one site but could not find a lot of info.
Any help please would be greatly appreciated.
Regards
Scott