RE: [PHP-DB] accessing two databases within one script

2004-10-05 Thread Oscar Rylin
Of course you can $whatever_db_linkid = mysql_connect($connectiondetails_for_whatever_db); if(is_resource($whatever_db_linkid)) { mysql_select_db('whatever_db', $whatever_db_linkid); } $someother_db_linkid = mysql_connect($connectiondetails_for_someother_db);

RE: [PHP-DB] accessing two databases within one script

2004-10-05 Thread Graham Cossey
I have several databases running on the same MySQL server and one application needs to run queries over two DBs at the same time. All I do is specify one connect (to the primary DB) and then specify the secondary DB within my queries. This seems to work fine, but not sure if it's discouraged for

Re: [PHP-DB] accessing two databases within one script

2004-10-05 Thread Andrew Kreps
On Mon, 04 Oct 2004 22:31:15 -0400, Gary Rachel [EMAIL PROTECTED] wrote: I've tried not using the mysql_close statement. But that option doesn't select the new database, it seems to stay connected to the previous one, despite my specifying a new database to access. Can I not access two