我正在使用下面的代码循环并从数据库中删除记录。请我想算一下代码循环中删除的行数。任何想法将不胜感激
$post_ids = intval($_POST['post_id']);
foreach($post_ids as $id){
// Delete record
// I will sanitize for sql injection attack later
$query = "DELETE FROM posts WHERE id=".$id;
mysqli_query($con,$query);
}
九州编程