帝国cms自界说列表多表查询统计代码
发布时间:2021-01-10 09:26:06 所属栏目:教程 来源:网络整理
导读:统计记录: 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,newstime from [!db.pre!]
统计记录: 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,newstime from [!db.pre!]ecms_movie order by newstime desc -----------------------注释:------------------------------- 以上挪用的是(消息模子:news、影戏模子:movie)两个模子的文章,两个模子用"Union"毗连挪用 若指定栏目用:where classid in(46,47,51), 若挪用保举在厥后追加:and isgood=1, 若指定挪用条数在厥后追加:limit 10 (编辑:湖南网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐
热点阅读