Forum Moderators: coopster
Another option is to read the records from one table and then select the corresponding record from the other table record by record. But this is extremely slow.
Another idea?
It depends on what you are doing with the data, how many records you have etc.
Why do you need to use 2 seperate db's?
For the record, you actually can join tables from different databases. I've done it from both the command line as well as through a PHP script. Not that you would normally want to, but you can. However,
The 2 options that look the best are
1. grab data from remote server
- create table
- insert data from remote server
- query to your hearts content
You could even have an import scipt that works on cron to do this at set intervals which would make things nice and simple.
2. select from remote db into array
- select from local db and read into same array
- sort your array using php functions
The cron would probably be the best and then just do local joins etc.