帝国cms php循环,帝国cms灵动标签实现循环子栏目数据

$bclassid=$GLOBALS[navclassid];//取得本栏目id

//取得本栏目下的子栏目

?>

[e:loop={“select classid, classname, classpath from `[!db.pre!]enewsclass` where bclassid=’$bclassid’ order by `classid` desc “,7,24,0}]

//这里是取得该分类下的有图片的最新数据

$commbook=$empire->fetch1(“select title,titlepic,smalltext,titleurl,keyboard,groupid,classid,newspath,filename,id from {$dbtbpre}ecms_news where classid = “.$bqr[classid].” and titlepic!=” order by newstime desc limit 1″);

$commbookurl=sys_ReturnBqTitleLink($commbook);

?>

//取得该分类下的最新数据

$newbook=$empire->query(“select title,titlepic,smalltext,titleurl,keyboard,newstime,groupid,classid,newspath,filename,id from {$dbtbpre}ecms_news where classid =”.$bqr[classid].” order by newstime desc limit 5″);

while($r=$empire->fetch($newbook)) {

?>

=date(‘Y-m-d’,$r[newstime])?>

//显示5条

?>

[/e:loop]

原文链接:https://blog.csdn.net/weixin_42112658/article/details/116039124?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166669233216782417022975%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166669233216782417022975&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-26-116039124-null-null.nonecase&utm_term=%E5%B8%9D%E5%9B%BDcms