如何检查行是否已更新?
如果数据库上的记录已更新,如何返回布尔值?
例:
try {
$SQL = "UPDATE addressbook SET valid = '0' WHERE id = :id";
$query = $this->db->prepare($SQL);
$query->bindValue(":id", $id);
$query->execute();
//How do I know if record has been updated?
} catch (PDOException $e) {
$j['success'] = 'false';
echo json_encode($j);
return;
}