数据库更新篇

将一个表里的聚合数据同步到另外一个表中ui

update ultrax_common_member_count member LEFT join ( SELECT thread.authorid as uid,count(1) as num FROM ultrax_forum_thread thread where thread.displayorder>=0 and thread.authorid=1 group by thread.authorid ) A ON member.uid=A.uid set member.threads=A.num where A.uid=1同步

相关文章
相关标签/搜索