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
1+4 =