Empire cms selects a set of two tables to sort by a certain field
The code is as follows:
<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>
Recommended study《 Empire cms tutorial》
The above is the detailed content of Sharing Empire cms selects a collection of two tables to sort by a certain field. For more information, please follow other related articles on the PHP Chinese website!