Well, if your database is just a single table (or only a few), it
shouldn't be much of a hassle in your code to use the other database for
everything except images, then taking the images from your own.
Adam Hooper
adamh@stripped
Tom Achtenberg wrote:
> OK what my situation is as follows. Our company is involved in child sponsorship in
> third world countries. Out vendor for our main database hosts the data on their server.
> The database of all the pictures of the children is on our local server. I need to pull
> and relate information from both of them.
>
> -----Original Message-----
> From: Adam Hooper [mailto:adamh@stripped]
> Sent: Wednesday, July 23, 2003 4:34 AM
> To: Adam Majer
> Cc: Tom Achtenberg; 'mysqlcc@stripped'
> Subject: Re: Select between two servers
>
>
> I can give one example off the top of my head, no thought required:
> Imagine you have two companies running with the same accounting
> software, each with their own DB server. To compare accounting
> information between them, it would be super to be able to SELECT from
> both servers at once. MSSQL Server has this feature, and we use it quite
> a bit at work (We'd even use it to join our MySQL website databases, but
> some ODBC weirdness forces us to use OPENQUERY() or something).
>
> As an aside: notice that in MySQL it is possible to select from two
> different databases on the same server, i.e., SELECT * FROM db1.table1
> t1 INNER JOIN db2.table2 t2 ON t1.id = t2.id ORDER BY t1.id.... If
> you're going to be mirroring a database on your local machine, it might
> be useful to keep your databases separate.
>
> Adam Hooper
> adamh@stripped
>
> Adam Majer wrote:
>
>>On Tue, Jul 22, 2003 at 09:50:46AM -0700, Tom Achtenberg wrote:
>>
>>
>>>I have a local MySQL installed and MyODBC connections to two other MySQL
> databases. In the command center I can execute sql commands on any one individual
> database. What I need to do is select from table on two different servers. I have not
> been able to find the syntax for the from in a select that specifies the server the table
> is in. Can anyone help?
>>
>>
>>You cannot do this - you cannot automagically split up a SELECT query
>>and the recombine the results.
>>
>>I do not belive that MySQL 5 will even have this "feature".
>>IMHO, it only makes sense to add it to client software.
>>
>>Futhermore, any way I can think of looking at it, I do not see
>>much benefit of an automagic query you describe.
>>
>>- Adam
>>
>>