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 |
Write a query to find the 2nd highest salary of an employee from the employee table?
sort term descripttion form, report and uery
How to create a session? How to set a value in session?
What is php and its features?
What is the main difference between require() and include()?
What is stdclass in php?
What are the differences between include() and include_once () functions?
Why super () is used in java?
what is interface in php? how it is use?
10 Answers Infosys, PHP, Times, Torque Infotech, Wipro,
my english is not too good then what we apply for a php programer post
What is a role of a designer in web development. Till what level the designer will do his work. Does he gives the complete html file or the tpl file or he should also include the smarty tag in the tpl file.
How the web server interprets php and interacts with the client?