Enter Keyword Hear for Search This Blog

Showing posts with label Update Query using Object Oriented Method. Show all posts
Showing posts with label Update Query using Object Oriented Method. Show all posts

Tuesday, 15 September 2020

Update Query using Object Oriented Method

 Update Query using Object Oriented Method


<?php

$mysqli = new mysqli("localhost", "root", "", "Mydb"); 

if($mysqli === false){ 

    die("ERROR: Could not connect. " 

            . $mysqli->connect_error); 

$sql = "UPDATE data SET Age='28' WHERE id=201"; 

if($mysqli->query($sql) === true){ 

    echo "Records was updated successfully."; 

} else{ 

    echo "ERROR: Could not able to execute $sql. ". $mysqli->error; 

$mysqli->close(); 

?>


Output is :




Featured post

what is ajax?how to create ajax with php code

Ajax Introduction -  એજેક્સ નો ઉપીયોગ કરી ને તમે પેજ લોડ કાર્ય વિના બધી માહિતી મેળવી શકો.એજેક્સ થી તમે કોઈ પણ ડેટા ઝડપ થી મેળવી શકો છો...