Re: join across databases - how to select databases?

From: Date: Fri, 22 Aug 2003 16:12:17 +0000
Subject: Re: join across databases - how to select databases?
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-30057@lists.php.net to get a copy of this message
I assume something like the following would work, regardless of whether/how you've called mysql_select_db() SELECT t1.column FROM database1.table1 t1 JOIN database2.table2 t2 ON t1.id = t2.id If you have something working from the MySQL command line, then it's going to work from mysql_query() with the same exact syntax.
You are indeed correct. I had a bug in my join syntax. How embarrassing. For the record, you don't even have to call mysql_select_db() at all.

« previous php.db (#30057) next »