请教大神,这样写,php的查询是否是执行了两次

请问大神,这样写,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>';
  }
}
?>
<?php 
$selectSpecialContent=$dbc->prepare("select * from naszt");
$selectSpecialContent->execute();
?>
<table align="center" cellspacing="0" cellpadding="0">
<tr>
<th>专题名称</th>
<th>专题类型</th>
<th>发表时间</th>
<th>发表ip</th>
<th>操作</th>
</tr>

<?php while($row=$selectSpecialContent->fetch()){ ?>
<tr id="<?php echo $row['id']?>">
<td><?php echo $row['ztname']?></td>
<td><?php echo $row['zttype']?></td>
<td><?php echo $row['zttime']?></td>
<td><?php echo $row['publiship']?></td>
<td><button><a href="ztselect.php?id=<?php echo $row['id']?>">查看</a></button><button><a href="upzt.php?act=up&id=<?php echo $row['id']?>">修改</a></button><button class='del' id="<?php echo $row['id']?>"><a href="selectzt.php?act=del&id=<?php  echo $row['id']?>" >删除</a></button></td>
</tr>
<?php }; ?>
</table>


请问大神,这样写,php的查询是否是执行了两次?

<script type="text/javascript">
$(function() {
  $('.del').click(function() {
    $('#'+$(this).attr('id')).remove();
  });
});
</script>
这段js就是删除当前的tr,但是我觉的$selectSpecialContent=$dbc->prepare("select * from naszt");
$selectSpecialContent->execute(); 这句SQL查询又被执行了一次

------解决方案--------------------
从头到尾只有一次查询操作,就算你执行删除操作,那也是一次查询操作。如果你删除的时候不想执行查询下面的内容,那你就要使用ajax 来操作了