Re: [PHP] How to Select multiples tables of different database in one query

2004-09-01 Thread Frédéric Hardy
Not difficult :
database db1
database db2
database db3
select db1.table3.column2, db2.table5.column1, db3.table1.column7 FROM 
db1.table3, db2.table5, db3.table1;

You can use alias in FROM on table like this :
select alias1.column2, alias2.column1, alias3.column7 FROM db1.table3 AS 
alias1, db2.table5 AS alias2, db3.table1 AS alias3;

Warning : the mysql user MUST have select (or insert, update, delete) 
right access on db1, db2 and db3.

Fred.
Tariq Murtaza wrote:
*Hi All,*
Can someone elaborate on How to Select multiples tables of different 
database in one query, perticularly when using php as scripting language.

Regards
*TM*
--
===
Frederic HARDYEmail: [EMAIL PROTECTED]
HEXANET SARL  URL: http://www.hexanet.fr/
ZAC Les CharmillesTel: +33 (0)3 26 79 30 05
3, allée Thierry Sabine   Direct: +33 (0)3 26 61 77 84
BP 202 - 51686 REIMS CEDEX 2 FRANCE
===
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: [PHP] How to Select multiples tables of different database in one query

2004-09-01 Thread Frédéric Hardy
Warning 2 : it is a mysql example. Whith other DBM, i don't know how to 
do that, but i think that its exactly the same thing.

PHP version : mysql_query($query).
Fred.
Tariq Murtaza wrote:
*Hi All,*
Can someone elaborate on How to Select multiples tables of different 
database in one query, perticularly when using php as scripting language.

Regards
*TM*
--
===
Frederic HARDYEmail: [EMAIL PROTECTED]
HEXANET SARL  URL: http://www.hexanet.fr/
ZAC Les CharmillesTel: +33 (0)3 26 79 30 05
3, allée Thierry Sabine   Direct: +33 (0)3 26 61 77 84
BP 202 - 51686 REIMS CEDEX 2 FRANCE
===
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]