Would this be achieved by using mysql_select_db("db-A") before the code that's going to use db-a and then mysql_select_db("db-B") before the code that's going to be accessing db-B ?
Regards,
Working on 2 MySQL databases within 1 .PHP file
Moderator: General Moderators
can be achieved that way, or by declaring two different variables pointing to the database connections in the format of
its all on the manual page at
http://uk2.php.net/manual/en/function.mysql-connect.php
Code: Select all
$link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password');
$link2 = mysql_connect('example2.com:3307', 'mysql_user', 'mysql_password');http://uk2.php.net/manual/en/function.mysql-connect.php