日期:2014-05-16 浏览次数:20770 次
update cc_hits,cc_news set cc_hits.catid=cc_news.catid where cc_hits.hitsid = concat('c-1-',cc_news.id);
------解决方案--------------------
update cc_hits a inner join cc_news b
on b.id=right(a.hitsid,1) set a.catid=b.catid
------解决方案--------------------
楼上强大~ 建议将right改成substring_index
update cc_hits a inner join cc_news b on b.id=substring_index(a.hitsid,'-',-1) set a.catid=b.catid