Simply indicate the database name in you query: SELECT cust2000.mytable.*, cust2001.mystable.* FROM cust2000.mytable, cust2001.mystable WHERE cust2000.mytable.cust_ID=cust2001.mystable.cust_ID;
-----Original Message----- From: Sommai Fongnamthip [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 31, 2001 11:37 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] retrieve data from more db HI, I have data on more than 1 db to separate in year name like these: cust2000 --> contain customer infomation in year 2000 cust2001 --> contain customer infomation in year 2001 all db have the same field name. I have put db name and table name in separate file (something like include.php). How I write php code to retrieve my interest value to display in one time? for more help pls describe how to layout compare table in the code. Thank you, SF -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]