Hi i just want to ask.
If if is possible to open two databases at once?
Let say,
require_once( "openDB1.inc.php" ); require_once( "openDB2.inc.php" );
Is this fine or no?
Thank you in advance.
yes as long as each link_identifier is specified
example:
$link1 = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $link2 = mysql_connect('localhost', 'mysql_user', 'mysql_password'); mysql_query($q2,$link1); mysql_query($q2,$link2);
In fact, if you use the PDO extension or MySQLi extension, you would not be able to rely on an implicit database connection. This is a Good Thing.
Also, note that with SQLite, you will be able to attach the second database to the one that is already in use.