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 |
How many types of array are there in php?
Write syntax to open a file in php?
What is static method php?
Who is the father of php and what is the current version of php and mysql?
Is echo a function in php?
What is csrf token and why it is required?
I have done 12th and then i completed 2 years course of web designing and development from xplora design skool, kota(rajasthan). I am a fresher. How much can i earn in this field ?
what is nl2br?
Explain setcookie() function in php?
Explain me the difference between include and require?
Are objects passed by value or by reference?
i got 2 year backs in my MCA,i am 28 year guy, presently learning PHP, can i get the job & on facing the interview wht i will answer out for that?? (experience in as a 1.5yr System analyst after graduation)