Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

PDO update Query


    $sql = 'UPDATE publishers
            SET name = :name
            WHERE publisher_id = :publisher_id';
    
    // prepare statement
    $statement = $pdo->prepare($sql);
    
    // bind params
    $statement->bindParam(':publisher_id', $abc);
    $statement->bindParam(':name', $abcd);
    
    // execute the UPDATE statment
    if ($statement->execute()) {
    	echo 'The record has been updated successfully!';
    }

Source by phpdelusions.net #
 
PREVIOUS NEXT
Tagged: #PDO #update #Query
ADD COMMENT
Topic
Name
5+3 =