PHP / SQL查询将不会执行

时间:2018-04-24 13:23:48

标签: php html

Hello由于某种原因,SQL查询不会运行,也不会删除数据库中的行。我想知道是否有人知道为什么会这样?

choosebid.php

<td>
  <form method = "POST" action= "actionpage9.php">
    <input type="hidden" value="<?php echo $row['bid_id']?>" name="bid_id" />
    <input type="submit" class="btn btn-xlarge btn-block btn-primary" value ="decline" />
  </form>
</td>

actionpage9.php

<?php
require 'config.php';

$bid_id    = $_POST['bid_id'];

$query   = "DELETE FROM bid WHERE 'bid_id' = '$bid_id'";
$success = $conn->query($query);

if (!$success) {
    die("Couldn't enter data: ".$conn->error);
}

header("location: choosebid.php");
$conn->close();
?>

1 个答案:

答案 0 :(得分:0)

将您的SQL语句从删除更改为删除