帝国cms选取两个表的集合实现按某字段排序

时间:2022-06-02 00:13:29
代码如下:

<div class="TitleBox"><a href="/" target="_blank">热门作品</a></div> 
<div class="BoxBlockMain PicBlock02"> 
<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 class="iHover"> 
<span class="pic"><a href="<?=$bqsr[titleurl]?>" target="_blank" title="<?=$bqr[title]?>"><img style="max-width:120px;max-height:86px;" src="<?=$bqr[titlepic]?>" class="_ImagesReSize" alt="<?=$bqr[title]?>" /></a></span> 
<span class="title"><a href="<?=$bqsr[titleurl]?>" target="_blank" title="<?=$bqr[title]?>"><?=esub($bqr[title],12)?></a></span> 
</li>[/e:loop] 
</ul> 
</div>