insert into `AAA`(title,content,summary) select 名称,concat("<p><strong>公司介绍:</strong><BR>",介绍,"</p><p><strong>联系方式:</strong>",联系),介绍 from Content LIMIT 325;
update `AAA` set cid=27 where cid=0;
update `AAA` set time=unix_timestamp() where time=0;
update `AAA` set lastedit=time where lastedit=0;
update `AAA` set author="大连黄页网",authorid=2 where authorid=0;
update `AAA` set lasteditor=author,lasteditorid=authorid where lasteditorid=0;
update `AAA` set tag=title where tag='';
insert into `BBB`(did,cid) select did,cid from (select * from AAA order by did desc limit 325)temp8 order by did asc;
delete from Content limit 325;
这些是存在sql文件里的
为什么运行了好多次,然后AAA和BBB俩个表里的记录数就不一样多了
这是什么什么呢
服务器在国外,可能导入时会慢一些,是不是影响了语句的运行,导致问题呢?
update `AAA` set cid=27 where cid=0;
update `AAA` set time=unix_timestamp() where time=0;
update `AAA` set lastedit=time where lastedit=0;
update `AAA` set author="大连黄页网",authorid=2 where authorid=0;
update `AAA` set lasteditor=author,lasteditorid=authorid where lasteditorid=0;
update `AAA` set tag=title where tag='';
insert into `BBB`(did,cid) select did,cid from (select * from AAA order by did desc limit 325)temp8 order by did asc;
delete from Content limit 325;
这些是存在sql文件里的
为什么运行了好多次,然后AAA和BBB俩个表里的记录数就不一样多了
这是什么什么呢
服务器在国外,可能导入时会慢一些,是不是影响了语句的运行,导致问题呢?
然后我反复运行了,最后不知道什么时候俩个表就对不上了,数量不一致了
另外检查一下你的MYSQL的错误日志。
我是反复在导content表
当content表剩下的记录不足325条了
比如还剩100条,就导到AAA中了
但是仍然从AAA中导了325条到BBB
这样数据就不一样多了
呵呵,谢谢这位哥们哈
我自问自答了,这个问题我想了俩个月,今天突然想明白了