List:General Discussion« Previous MessageNext Message »
From:Daevid Vincent Date:May 6 1999 5:13am
Subject:Re: join across databases?
View as plain text  
> > Is it possible to join across databases?
> > If not, when will this be possible if ever?
>
> If you're using 3.22.x you can do it now. Ex:
>   SELECT db.table.col, db2.table2.col FROM db.table, db2.table;

Oh excellent!

How do I do this using PHP?

currently I do something like this to get data out of a SINGLE database:
   $linkid = mysql_pconnect( "localhost", "nobody", "oct1497")  or  die( "Unable
to connect to mySQL server");
   $sql =  "SELECT function_id, function_name FROM Function_Table";
   $result = mysql("mydatabase", $sql);
   $rcnt = mysql_numrows($result);

the mysql() function only allows one database name to be entered correct?


This may be pushing things, but can I join across databases on different
servers?

Thread
join across databases?Daevid Vincent6 May
  • Re: join across databases?Thimble Smith6 May
  • Re: join across databases?Daevid Vincent6 May
    • Re: join across databases?Thimble Smith6 May
  • Re: join across databases?Daevid Vincent6 May
    • Re: join across databases?Chuck6 May
      • Re: join across databases?Thimble Smith7 May
  • Re: join across databases?kalle volkov6 May