How can I retrieve values from one database server and
store them in other database server using PHP?
Answer / mahesh
$db1 = mysql_connect(”host”,”user”,”pwd”)
mysql_select_db(”db1name;, $db1);
$res1 = mysql_query(”query”,$db1);
$db2 = mysql_connect(”host”,”user”,”pwd”, true)
mysql_select_db(”db2name;, $db2);
$res2 = mysql_query(”query”,$db2);
So mysql_connect has another optional boolean parameter
which indicates whether a link will be created or not. as we
connect to the $db2 with this optional parameter set to
‘true’, so both link will remain live.
now the following query will execute successfully.
$res3 = mysql_query(”query”,$db1);
| Is This Answer Correct ? | 8 Yes | 2 No |
Explain what does the unset() function means?
hi, i have knowledge about PHP/MYSQL,i am fresher M.Sc-IT 2009 pass out,any recruitment in PHP please let me know.
What do you use php for?
What are the advantages of PHP over HTML?
11 Answers Infosys, Torque Infotech,
What is dao in php?
Explain about the data types in PHP?
What is the use of Php variables?
What is isset php?
What is a static method php?
is that "enumerated array" equal to "numeric array"?
why we used type-pool SLIS in ALVs? how many types of windows in scripts?
What is array function in javascript?