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 |
Which methods should be used for sending an email using the variables $to, $subject, and $body?
Can anybody plz tell me if there any recruitment on php plz mail to vasudev.adepu@gmail.com.i had completed M.SC(MATHS) in 2007 . trying to get a job on php. i have good knowledge on PHP/MYSQL
What is The difference between ' and " where they can ben in between or outmost and how
What is session php?
What is indexing in mysql and how do we create indexing in mysql
How do you set the browser timeout?
how to retrieve from database..... this format (PRMRMDU402). firstname= prabhu, lastname=kumar, city=madurai, pincode=624402.... i want first name first two letters and last name last two letters ... city first two letters ... pin code last three letters....
What is difference between session and cookie in PHP?
What is explode() in php?
How many escape sequences are recognized in single-quoted strings?
What is serialization / object serialization ?
Why do we use namespace in php?