:id";$stmt = $pdo->prepare($sql);$stmt->execute(array(':id' => 7));echo $">
当前位置:Gxlcms > PHP教程 > PHPPDO数据库类delete操作

PHPPDO数据库类delete操作

时间:2021-07-01 10:21:17 帮助过:16人阅读

  1. //数据删除

  2. $sql = "DELETE FROM `test` WHERE `id` > :id";
  3. $stmt = $pdo->prepare($sql);
  4. $stmt->execute(array(':id' => 7));

  5. echo $stmt->rowCount();

人气教程排行