Need help to split this query

admin

Administrator
Staff member
Hi!
I have a query that currently select data from two different tables in the same database.
However, I would like to do the same thing with the two tables being in two different databases on two different hosts.
How can I get the same results with two queries on the two hosts as I have with the following query:
SELECT *, FLOOR($d) AS distance FROM zip,userdata WHERE zip.id = userdata.zipid HAVING distance < 25 order by distance asc

As I said, it's currently in the same DB, but I will soon have the table zip on host1 and in the database1 and the table userdata on host2 in the database2.
Could someone show me how to do this? :)
Ciao
Sascha
 
Back
Top