Ask the great God, so write, PHP query is executed two times?
$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 "";
}else{
Echo ';
}
}
?>
$selectSpecialContent = $dbc->prepare ("SELECT * from Naszt");
$selectSpecialContent->execute ();
?>
| Topic name |
type of topic |
Publication Time |
Publish IP |
Operation |
Fetch ()) {?>
|
|
|
|
|
"> View "> Modify the > Delete |
Ask the great God, so write, PHP query is executed two times?
This JS is to delete the current TR, but I feel the $selectspecialcontent= $dbc->prepare ("SELECT * from Naszt");
$selectSpecialContent->execute (); This SQL query was executed once again.
Share to: more
------Solution--------------------
There is only one query operation from beginning to end, even if you perform the delete operation, it is also a query operation. If you do not want to execute the query when you delete, then you need to use Ajax to manipulate the