文章列表
我要删除的是url这个字段里面重复的记录,你可以根据自己的需求来替换。
DELETE FROM v9_spider WHERE url IN (SELECT * FROM ( SELECT url FROM v9_spider GROUP BY url HAVING COUNT( * )>1) b WHERE v9_spider.url=b.url) AND id NOT IN (SELECT * FROM ( SELECT MIN(id) AS id FROM v9_spider GROUP BY url) c WHERE v9_spider.id=c.id)
// session bug
if(isset($_POST['PHPSESSID']) && !empty($_POST['PHPSESSID']))
{
session_destroy();
session_id($_POST['PHPSESSID']);
session_start();
}