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 |
What is session expiry?
Explain me soundex() and metaphone()?
What are the different opening and closing tags available in PHP?
Can we use include (?abc.PHP?) two times in a PHP page ?makeit.PHP??
How can I convert ereg expressions to preg in php?
What is csrf mvc?
How check variable is set or not in php?
What is faster in php?
What advance thing in php7?
hi to all i am fresher in php and want to learn php and want a fresher job in php. how to total time i expend to learn php and what is freshers salary.
what is mean php ? is it designingtool or language? how ill create website using by php?
Is php front end or back end?