how to do connectivity of 2 dbs in PHP script?
Answers were Sorted based on User's Feedback
Answer / 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 |
Explain Type hinting in PHP?
What is the difference between $argv and $argc? Give example?
Which function would you use to format date information in php?
what is the default session expire time in php? what is default file attachment size in mail in php?
What is laracast?
Can a trait extend a class php?
how prepare the testing documentation.
Name some of the constants in php and their purpose.
I need to know about the courses which are useful in corporate companies.. especially php/mySQL, Java/j2ee, .NET.. also tell if any other courses are valuable
What is RSS?How to use it in Program?
How to Retrieve the Session ID of the Current Session?
What is the difference between public, protected and private?