UPDATE WITH JOIN
UPDATE t1 SET t1.name = t2.empname //copy content from one table to another FROM table1 t1 INNER JOIN table2 t2 ON t1.id = t2.t1id
UPDATE t1 SET t1.name = t2.empname //copy content from one table to another FROM table1 t1 INNER JOIN table2 t2 ON t1.id = t2.t1id
picker.html <html> <head> <title>colour picker demo</title> <script> function pick() //------------------------------------------>step 3 { var elem = document.getElementById("para1").value; var cook=document.cookie="#"+elem; var colour=document.getElementById("change"); colour.style.background=cook; } </script> </head> <body> <div style="height:100px; width:400px;" id="change"> <!--colour change--> </div> <script type="text/javascript" src="jscolor.js"></script> //->step1 Click here: <input class="color" value="" onblur="pick()" id="para1">//->step2 //---------------------------------------------------- >step 4 </body> </html>
cURL: 1.cURL is a Command line tool for getting and sending datas through URL
Now we can display the Google webpage with search key word "technoblazze" in your server by using cURL We have to Follow 4 steps to do the above task 1.initialize the curl session 2.set various option for the session 3.Execute the option, fetch and display the datas in your server 4.close the curl sessioncurl.php
<?php
$curl = curl_init('http://www.google.com/search?q=technoblazze.blog'); //step1
curl_setopt($curl, CURLOPT_FAILONERROR, true); //step2
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl); //step3
curl_close($curl); //step4
echo $result;
?>
books.xml : <?xml version="1.0"?> <datas> <books> <book>
<id>1</id> <title>PHP Undercover</title> <author>Arun</author> </book> <book> <id>2</id> <title>PHP Enterprise</title> <author>Vibin</author> </book> </books> </datas>
xmlread.php : <?php
$xml = simplexml_load_file("books.xml") or die("Error: Cannot create object"); //include the books.xml file foreach($xml as $books) // seperate variables, books array from xml file { foreach($books as $book ) // seperate variables, book array from books file { echo $book->id; //display the id echo "<br />"; echo $book->title; //display the title echo "<br />"; echo $book->author; //display the author echo "<br />"; }
} ?>
Output: 1 PHP Undercover Arun 2 PHP Enterprise Vibin