帝国cms选取两个表的集合实现按某字段排序
代码如下:
<div><a href="/" target="_blank">热门作品</a></div>
<div>
<ul>[e:loop={'select title,titleurl,onclick,titlepic from `[!db.pre!]ecms_test` Union All select title,titleurl,onclick,titlepic from `[!db.pre!]ecms_gamepic` order by onclick desc limit 6',6,24,1}]
<li>
<span><a href="<?=$bqsr[titleurl]?>" target="_blank" title="<?=$bqr[title]?>"><img src="<?=$bqr[titlepic]?>" alt="<?=$bqr[title]?>" /></a></span>
<span><a href="<?=$bqsr[titleurl]?>" target="_blank" title="<?=$bqr[title]?>"><?=esub($bqr[title],12)?></a></span>
</li>[/e:loop]
</ul>
</div>
本文由主机测评网发布,不代表主机测评网立场,转载联系作者并注明出处:https://zhuji.jb51.net/diguocms/6883.html