我使用此代码来触发行删除:
<a href="javascript:void(0);" onclick='$.get("web_page.php",{ cmd: "delete_stmt", id_f: "<?php echo $rrows['id_f']; ?>", id: "<?php echo $row['id']; ?>" } ,self.location="web_page.php");'>delete</a>
这是代码:
if($get['cmd'] == 'delete_stmt') {
$stmt = $conn_bd->prepare("DELETE FROM table WHERE id_f=:id_f and id=:id");
$stmt->execute(array('id_f' => $get[id_f], 'id' => $get[id]));
$stmt->execute();
}
记录总是从数据库表中删除,但有时记录会显示在网页上。这发生在 IE、Firefox、Chrome 中......
你知道是什么原因造成的吗?
想