您现在的位置是:首页 > 教程 > 帝国CMS教程帝国CMS教程
帝国CMS自定义列表的排序newstime时间,onclick点击或浏览,plnum 评论,diggtop
豪基2023-01-22 15:52:04帝国CMS教程已有人查阅
导读[!db.pre!]ecms_movie 为数据表类型(movie是电影数据表)举一反三排序方式:id(id)、newstime (时间)、onclick(点击或浏览)、p统计记录: select count(*) as total from [!db.pre!]ecms_movie
统计记录:
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报错Warning: Cannot modify header information怎么办
今天偶然进入帝国CMS网站后台发现出现了:Warning:Cannot modify header information - headers already sent by -
帝国CMS灵动标签SQL调用多条广告不如js灵活
用:select * from phome_enewsad where adid in (广告ID1,广告ID2,....)>phome_enewsad 数据表字段解释(广告表) -
本地环境phpStudy搭建帝国CMS的方法
phpStudy是一款老牌服务器环境一键集成软件了,软件一键安装,安装完成之后不在需要配置就能够使用,非常的简单方便,可以说是非常好用的PHP调试环境。 -
解决帝国CMS设置关键词与内容图片链接冲突的方法
以下是解决方法,已测试!在e/class/functions.php中,查找代码:“ function ReplaceKey($newstext,$classid=0)” 或 “//替换关键字”(有时打开为utf-8时中文显示为乱码)
留言与评论 (共有 条评论) |