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 |
how we can use lamp.ie installatiion and basic workings.Is it similar to wamp in usage?
What is The difference between ' and " where they can ben in between or outmost and how
Explain how to run the interactive php shell from the command line interface?
Write a program to find a string is palindrome or not?
code to see the priview of the image which is being uploaded (after browising the image... just click priview ... how it will be visible...before uploading)
What is the timeout period on session values?
How can php and html interact?
How to create reusable code in php?
Is php case sensitive?
How to terminate the execution of a script in PHP?
Is array function in php?
What is get and post method in php?