Multiple DB's

From: Date: Tue, 14 May 2002 18:41:31 +0000
Subject: Multiple DB's
Groups: php.db 
Request: Send a blank email to php-db+get-19178@lists.php.net to get a copy of this message
Hi, I use MySQL and are trying to have 2 open databases. I do like this: $db1=db_connect($CFG->dbhost, "DB1", $CFG->dbuser, $CFG->dbpass); $db2=db_connect($CFG->dbhost, "DB2", $CFG->dbuser, $CFG->dbpass); Then I am trying to run a CREATE TABLE, $qid = db_query(" CREATE TABLE tmp ( Dato INT(2) ) "); but I don't know how to specify which database it should use. How do I specify wether it should use db1 or db2? Regards, Morten

« previous php.db (#19178) next »