Bing Du wrote:
> I have two separate databases that I need to query data from.  In the
> following SELECT statement, 'title' and 'db_entry_name' are in database1,
> and 'projectID' is in database2.  If they were in one database, this
> SELECT should work. How should I tweak it to get data from both database1
> and database2?  Is that even possible in single SELECT?
>
> SELECT title, db_entry_num, projectID FROM account_info, ResearchProjects
> WHERE ResearchProjects.IDNo = $idno AND account_info.db_entry_num =
> ResearchProjects.projectID


This is easy as long as the dbs are on the same machine:

SELECT * from db1.table1, db2.table1...

Eric


--
Eric Braswell
Web Manager     MySQL AB
Cupertino, USA




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to