分享帝国cms教程之调用全部数据表的最新数据的方法
代码如下:[e:loop={'select * from ( select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_book where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from……
代码如下:
[e:loop={'select * from ( select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_book where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_course where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_soft where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_game where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_js where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_templet where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_mv where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_news where newstime) a order by newstime desc limit 7',7,24,0}] <li><b><?=$bqno?></b><div><a href="<?=$bqsr[classurl]?>" target="_blank">[<?=$bqsr[classname]?>]</a></div><a href="<?=$bqsr['titleurl']?>" class="gxone" target="_blank"><?=$bqr['title']?></a></li> [/e:loop]
- 上一篇
帝国cms教程调用某个数据表中会员的发帖排行榜
调用会员在某个数据表发帖量的排行,没有发布信息的会员按照会员ID排序代码如下:select u.username,u.userid,(select count(*) from phome_ecms_photo where userid = u.userid) as myorder from phome_enewsmember
- 下一篇
帝国cms7.0自动获取标题首字母的方法
在做下载站或电影站时会用到按首字母索引功能,这里做一下介绍。1、在数据表中添加字段 infozm2、在模型中设置为录入项,如图一所示这时录入信息便会自动生成首字母。扩展一下例如 标题为 1942 的电影,这里默认会生成Y字