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 |
Shopping cart online validation i.e. how can we configure Paypal, etc.?
Explain me what is the use of header() function in php?
How to avoid the undefined index error?
What is a definer in mysql?
How can you associate a variable with a session?
Is php outdated 2019?
Create a PHP web script with the following attributes: on start, three HTML form elements are shown: an string input field, a checkbox field, a dropdown/pull down list with 5 elements and a submit button. On submission, the form should be redisplayed (while remaining all options/inputs as the user has selected/entered them). Additionally, the selections/inputs of the user should be displayed in text. Please solve this without the use of any external libraries.
Tell me how do I escape data before storing it into the database?
How will you create a bi-lingual site (multiple languages) ?
What is die in php?
Php program to generate fibonacci series?
What is the difference between associative array and indexed array?