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
Is age nominal or ordinal?
What are php filters?
Tell me how can we define a variable accessible in functions of a php script?
How a constant is defined in a php script?
Write a program in php to reverse a number?
What are the popular frameworks in php?
What is the latest version of php?
What is difference between php and wordpress?
What is difference between sql and php?
Differences between get and post methods?
Xplain is it possible to use com component in php?
How to get a total number of elements used in the array?
Do you know design patterns. List few?
Tell me how is it possible to know the number of rows returned in result set?
Tell me what is the use of isset() in php?