[thelist] selecting tables from two databases
David Kutcher
david_kutcher at hotmail.com
Thu Apr 25 12:53:03 CDT 2002
How would the mysql_pconnect and mysql_select_db functions be structured?
I've never seen them with multiple databases. Or would I simply connect to
one, and assuming the same user privs, be able to cross-connect to another
local db?
My typical db connection script looks like:
-----------------------------------------------------------------
$db = mysql_pconnect("servername", "username", "password");
if (!$db)
{
echo "Error: Could not connect to database. Please try again later.";
}
mysql_select_db("databasename", $db);
-----------------------------------------------------------------
How or what should I modify this to to accomodate multiple databases?
David
----- Original Message -----
From: "Michiel Trimpe" <M.B.Trimpe at student.tue.nl>
> If they're on the same MySQL server process and the user has
> privileges for both databases you can use the database.table syntax.
> The other mail said database..table but I suppose that that's MS SQL
> specific as he stated.
More information about the thelist
mailing list