做网站找实速,专业网站制作设计平台
首页 > 课堂 > 网站技术 > 详情
网站标签 / Tags

帝国CMS自定义列表的排序newstime (时间)、onclick(点击或浏览)、plnum (评论)、diggtop 、rand

2020-02-16 16:30:58   来源:实速网络|网站建设|网站设计|网站优化|网站仿制|网站SEO|网站推广|空间域名|主机VPS|服务器|网站源码|网站模版   浏览: 次
帝国CMS自定义列表的排序newstime (时间)、onclick(点击或浏览)、plnum (评论)、diggtop 、rand 发布时间:2019-10-17 来源:未知 浏览: 关键词:

帝国CMS自定义列表的排序newstime (时间)、onclick(点击或浏览)、plnum (评论)、diggtop 、rand

发布时间:2019-10-17 来源:未知 浏览: 关键词:

统计记录: select count(*) as total from [!db.pre!]ecms_movie

查询记录: select * from [!db.pre!]ecms_movie order by id desc

注释:[!db.pre!]ecms_movie 为数据表类型(movie是电影数据表)

desc - 降序排列 ASC - 升序排列

id desc 是按id降序排列 id ASC 是按id升序排列

举一反三排序方式:id(id)、newstime (时间)、onclick(点击或浏览)、p统计记录: select count(*) as total from [!db.pre!]ecms_movie

查询记录: select * from [!db.pre!]ecms_movie order by id desc

注释:[!db.pre!]ecms_movie 为数据表类型(movie是电影数据表)

desc - 降序排列 ASC - 升序排列

id desc 是按id降序排列 id ASC 是按id升序排列

举一反三排序方式:id(id)、newstime (时间)、onclick(点击或浏览)、plnum (评论)、diggtop 、rand (随机)

如:增加当前栏目(一般是错误的,因自定义列表不能用当前栏目这个参数,这是只是一个引用以备其他地方应用)
where classid='$GLOBALS[navclassid]'当前栏目

统计记录: select count(*) as total from [!db.pre!]ecms_movie where classid='$GLOBALS[navclassid]'

查询记录: select * from [!db.pre!]ecms_movie where classid='$GLOBALS[navclassid]' order by id desc

---------------------------------------------------------------------------

自定义列表调用多个栏目,或指定栏目(sql中指定的栏目ID必须为终极栏目ID)

统计记录: select count(*) as total from [!db.pre!]ecms_movie where classid in (23,24,25)

查询记录: select * from [!db.pre!]ecms_movie where classid in (23,24,25) order by id desc

lnum (评论)、diggtop 、rand (随机)

如:增加当前栏目(一般是错误的,因自定义列表不能用当前栏目这个参数,这是只是一个引用以备其他地方应用)
where classid='$GLOBALS[navclassid]'当前栏目

统计记录: select count(*) as total from [!db.pre!]ecms_movie where classid='$GLOBALS[navclassid]'

查询记录: select * from [!db.pre!]ecms_movie where classid='$GLOBALS[navclassid]' order by id desc

---------------------------------------------------------------------------

自定义列表调用多个栏目,或指定栏目(sql中指定的栏目ID必须为终极栏目ID)

统计记录: select count(*) as total from [!db.pre!]ecms_movie where classid in (23,24,25)

查询记录: select * from [!db.pre!]ecms_movie where classid in (23,24,25) order by id desc

责任编辑:实速科技
相关热词搜索: 上一篇:帝国CMS内容页模板多个作者的调用方法 下一篇:帝国CMS 上传附件保持原文件名的方法!