<?php $affected_rows = $db->exec("UPDATE table SET field='value'"); echo $affected_rows.' were affected'
<?php $stmt = $db->prepare("UPDATE table SET name=? WHERE id=?"); $stmt->execute(array($name, $id)); $affected_rows = $stmt->rowCount();