how to do connectivity of 2 dbs in PHP script?
Answer Posted / lt
If you are trying to open multiple, separate MySQL
connections with the same MySQL user, password, and
hostname, you must set $new_link = TRUE to prevent
mysql_connect from using an existing connection.
The workaround is to require that the second MySQL
connection is new:
$db1 = mysql_connect($dbhost, $dbuser, $dbpass);
$rv = mysql_select_db($dbname1, $db1);
$db2 = mysql_connect($dbhost, $dbuser, $dbpass, TRUE);
$rv = mysql_select_db($dbname2, $db2);
Source: http://jp2.php.net/manual/en/function.mysql-connect.php
Message from: arithmetric at gmail dot com
26-Mar-2008 03:59
| Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
How to create a mysql connection in php?
What is a php certification?
Why do we use htaccess
What is the scope of a variable defined outside a function?
What is php dependency injection?
Explain mail function in PHP with syntax?
What is uniqid php?
List some sorting functions in php?
Is laravel better than codeigniter?
Applications written to provide a GUI shell for Unix and Linux are called
How to return ascii value of character in php?
The left association operator % is used in PHP for?
What is local variable in php?
Tell me in php, objects are they passed by value or by reference?
How does php sessions work?