|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I would like to connect to two different mysql databases on two different machines and run a query using tables from these two different DB's.
Is that possible directly or should I store a query on DB1 first as a temp table in DB2 and then run a query against a table in DB2 and the temp. table? I use PHP4 and Apache 1.3.12. I hope someone can help me on the way. VidJa |
|
#2
|
|||
|
|||
|
You can join tables in different databases on the same machine but not on different machines. You'll need two seperate queries.
|
|
#3
|
|||
|
|||
|
and how can I do that, I'm pretty new to PHP, MySQL and SQL in particular.
|
|
#4
|
|||
|
|||
|
Well, that really depends on what you are trying to do. What information in the first database affects what you are trying to do in the second and how, etc.
|
![]() |
| Viewing: Dev Shed Forums > Databases > MySQL Help > query using two databases. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|