请教大神,这样写,php的查询是否是执行了两次
请问大神,这样写,php的查询是否是执行了两次?$act=$_GET['act'];
$id=$_GET['id'];
switch($act){
case "del";
$del=$dbc->prepare("delete from naszt where 1=1 and id=?");
if($del->execute(array($id))){
echo "《script》";
echo "$(function() {";
echo "$('.del').click(function() {";
echo " $('#'+$(this).attr('id')).remove()";
echo "})";
echo "})";
echo "《script》";
}else{
echo '《script》alert("由于网络原因,删除失败,请重试!");《script》';
}
}
?>
$selectSpecialContent=$dbc->prepare("select * from naszt");
$selectSpecialContent->execute();
?>
专题名称 | 专题类型 | 发表时间 | 发表ip | 操作 |
---|---|---|---|---|
请问大神,这样写,php的查询是否是执行了两次?
PHP之友评论