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: Thursday, November 01, 2001 3:24 AM
To: [EMAIL PROTECTED]
Subject: 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 


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to