我正在使用以下代码来更新我的查询。假设我的能力值为 0,并且没有发生此更新。我怎样才能知道?
$statement = $conn->prepare ('UPDATE players SET
ability = ability - 1 WHERE id = :playerId AND ability > 0');
$statement->bindParam (':playerId', $player['id'],PDO::PARAM_INT);
$statement->execute();