帝国cms内容页怎么用灵动标签调用当前信息的前三篇和后三篇文章作为推荐阅读,如果没有就不调用
sql语句
select * from 表 where id < 5 limit 3 union select * from 表 where id > 5 limit 6
灵动标签调用代码
[e:loop={'select * from 表 where id < 5 limit 3 union select * from 表 where id > 5 limit 6',6,24,0}]
<li class='articlelist'> <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a>
[/e:loop]