帝国CMS使用灵动标签随机调取文章

[e:loop={"select * from {$dbtbpre}ecms_sitenav order by rand() desc limit 6",20,24,0}]
<div class="col-12 col-md-6 col-lg-4">
<div class="ho-hotsitenav">
<em><a href="<?=$bqsr['titleurl']?>" rel="nofollow"><img src="<?=$bqr[titlepic]?>" class="img-fluid" alt="<?=$bqr['title']?>"></a></em>
<span>
<strong><a href="<?=$bqsr['titleurl']?>" rel="nofollow"><?=$bqr['title']?></a></strong>
<p><?=$bqr['smalltext']?></p>
</span>
</div>
</div>
[/e:loop]

{$dbtbpre}ecms_sitenav   数据表
order by rand()   随机
limit 6   数量

未经允许不得转载:OZ分享-吉家大宝官方博客 » 帝国CMS使用灵动标签随机调取文章

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

置顶文章