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 are psrs? Choose 1 and briefly describe it?
Explain what does the function get_magic_quotes_gpc() means?
What are the file upload settings in configuration file?
What are the different types of Errors in PHP?
20 Answers Cisco, TCS, Troop Software,
How to set a page as a home page in a php based site?
What is echo in html?
What is php artisan tinker?
What is the difference between rest and soap?
Explain what is the use of "echo" in php?
How to remove white spaces from the beginning and/or the end of a string in php?
What is csrf token and how it works?
I created a cookie with the value like '1A2A',now i want to update this value regularly (about 20 times in a minute) with the value '1A2A3A' , 3A is the new value,new value will vary on the request it may be 3A or 4A or 100A ,some times the cookie is updating with new value but not every time.Can any body suggest the solution