View Single Post
Old 10-22-07, 02:04 PM   #1
fivefeet8
Ngemu Mod
 
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default PHP/Mysql Multiple Questions

Scenario: I have two databases located on two different servers. There are two options for the databases. 1. They contain a set of tables that are not in the other, but there would need to be a way to join those tables in queries. For example, database1 would contain tables a,b,c while database2 would have tables d,e,f. 2. They both are exact mirrors of each other with the same tables and data, but there would need to be a way to syncronize the data between the two. ie. (both databases have a,b,c,d,e,f tables)

1. How do you handle multiple mysql server connections on a single script/page? Is it even possible without having to use a "database.table.field" type queries? I would like to be able to open 2 connections to different databases located on different servers, then using joins on tables from both of them. Is that possible?

2. The two mysql servers can't be configured for Replication from Master to Slave. Is there a way to do replication type functionality with PHP? How would you compare 2 Mysql tables with PHP? What would be the simplest way?
__________________
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote