时间:2021-07-01 10:21:17 帮助过:22人阅读
无限分类
分享到:

do {
$rs = mysql_query('SELECT group_concat(id) FROM 表 where pid not in(select id from 表)');
list($g) = mysql_fetch_row($rs);
mysql_query("delete from 表 where id in (g)");
}where(mysql_affected_rows());