Re: Left Join Across Two Databases
| From: | Steve Werby | Date: | Thu, 05 Apr 2001 14:15:33 +0000 |
| Subject: | Re: Left Join Across Two Databases | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-47260@lists.php.net to get a copy of this message | ||
"Jonathan Chum" <jchum@techdevelopers.com> wrote:
> I have one table on one database and another table on another
> database. I want to perform a left join these two tables in MySQL. I
> don't think it's possible, but cuious if there is a "method" that can
> be coded in PHP to do this?
Just prepend the DB name to the table selecting from:
SELECT table_1_from_db_connected_to, other_db_name.table_2 ...
And make sure that the user for the first DB has permissions for the second
DB.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/