delete phome_ecms_news from phome_ecms_news, (select id from phome_ecms_news group by title having count(*)>1 ) as t2 where phome_ecms_news.id=t2.id
执行完成以上命令,还要执行一下 下面的语句来修正 副表.
delete from 'phome_ecms_news_index' where id not in(select id from phome_ecms_news)//开源软件:Vevb.com
以上命令执行完即可,也可以用以下的命令修正副表 ID 错误,用以下命令进入 PHPMYADMIN 管理多于的错误 ID:
SELECT id FROM phome_ecms_news_data_1 WHERE NOT EXISTS (SELECT null FROM phome_ecms_news WHERE phome_ecms_news.id = phome_ecms_news_data_1.id);
新闻热点
疑难解答