我使用这个解决方案,但它使页面加载非常慢注意我使用 MikroTik
$sel_u=mysqli_query($connect,"SELECT * FROM ppp WHERE serial='".$aa[0]['serial-number']."' ORDER BY id_user ASC")or die(mysqli_error($connect));
while($fet_u=mysqli_fetch_array($sel_u)){
$ar=$API->comm('/ppp/secret/print',array(
"?.id"=>$fet_u['id_user'],
));
if (count($ar)<mysqli_num_rows($sel_u) AND count($ar)==0){
mysqli_query($connect,"DELETE FROM ppp WHERE id_user='".$fet_u['id_user']."' AND serial='".$aa[0]['serial-number']."'");
}
}