In PHP, how does one batch delete objects ?. In PHP, how does one batch delete objects? The code has recently been working on a project, but Batch deletion does not work. I pasted the code below. you guys can help me see how to batch delete the code in PHP? Code
Recently, I was working on a project, but Batch deletion never worked. I pasted the code below. you guys can help me see where the problem is. thank you again!
// 1. batch delete
If ($ _ POST ["chk"]) {
$ Sid = implode (",", $ _ POST ["chk"]);
$ Query = mysql_query ("delete from news where news_id in (". $ sid .")");
If ($ query ){
Echo "";
}
Else {
Echo "";
}
}
This method cannot be deleted. you can also delete it if you click cancel.
------ Solution --------------------
Let's echo the SQL statement to find out what the execution is, and try other solutions.
------ Solution --------------------
This problem can be easily solved by printing $ _ POST ["chk"] and printing SQL statements.
------ Solution --------------------
We recommend that you paste your code
------ Solution --------------------
Echo "";
Your checkbox does not provide value.
------ Solution --------------------
Point cancellation can also be deleted because this sentence needs to be written as follows:
There are also del () functions:
If (num = 0 ){
Alert ("Please select! ");
Return false;
}
Why? The code has recently been working on a project, but Batch deletion does not work. I pasted the code below. you guys can help me see the problem...