📜  使用 pdo update 语句获取 php 中受影响的行数 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:42.743000             🧑  作者: Mango

代码示例1
prepare("UPDATE user SET name=:name WHERE id=:id");
$updatedCount = $update_stmt->execute(['name' => 'Bernard Arhia','id' => 2]);

//$updateCount will return true if query was successful else it will return false