Re: [PHP] multiple db query

2003-09-02 Thread murugesan
I tried this and it is working well.

I use 2 DB namely db1 and db2

Mysql>use db1;
Mysql>select vv.visitorname,aa.visitorname  from  db1.visitordetails vv,
db2.visitordetails aa;

-Murugesan



- Original Message -
From: "Marek Kilimajer" <[EMAIL PROTECTED]>
To: "Aris Santillan" <[EMAIL PROTECTED]>
Cc: "Php (E-mail)" <[EMAIL PROTECTED]>
Sent: Tuesday, September 02, 2003 4:29 PM
Subject: Re: [PHP] multiple db query


> For MySQL Version 3.23.25 and above - yes, and it is (surprisingly)
> called MERGE. I'm not sure if tables can be merged across databases.
> More in the manual.
>
> Aris Santillan wrote:
>
> > is it possible to query on 2 databases
> > but with same tablename and merge its output?
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] multiple db query

2003-09-02 Thread Marek Kilimajer
For MySQL Version 3.23.25 and above - yes, and it is (surprisingly) 
called MERGE. I'm not sure if tables can be merged across databases. 
More in the manual.

Aris Santillan wrote:

is it possible to query on 2 databases
but with same tablename and merge its output?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] multiple db query

2003-09-02 Thread John W. Holmes
Aris Santillan wrote:
is it possible to query on 2 databases
but with same tablename and merge its output?
Probably. It depends upon your database, though.

SELECT t1.column, t2.column FROM database1.table1 t1, database2.table2 
t2 WHERE ...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php