统计记录调用:
select count(*) as total from [!db.pre!]ecms_news union select count(*) as total from [!db.pre!]ecms_movie
查询记录:
select classid,id,titleurl,title,newstime from [!db.pre!]ecms_news union select classid,id,titleurl,title,newstime from [!db.pre!]ecms_movie order by newstime desc
以上调用的是(新闻模型:news、电影模型:movie)两个模型的文章,两个模型用”Union”连接调用
若指定栏目用:where classid in(46,47,51),
若调用推荐在其后追加:and isgood=1,
若指定调用条数在其后追加:limit 10
新起点博客
![[河南seo]优化企业站点容易忽视的细节有哪些?-新起点博客](http://www.henenseo.com/wp-content/uploads/2019/03/seo-2.jpg)


评论前必须登录!
注册