//データ削除 $sql = "DELETE FROM `test` WHERE `id` > :id"; $stmt = $pdo->prepare($sql); $stmt->execute(array(':id' => 7)); echo $stmt->rowCount(); コピーコード