1、调用所有
[e:loop={"select * from {$dbtbpre}ecms_news_doc order by id desc limit 20",0,24,0}] <li> <?=$bqno?>、<a href="<?=$bqsr[classurl]?>" title="<?=$bqsr[classname]?>"><?=$bqsr[classname]?></a> <a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],40)?></a> </li> [/e:loop]
2、当前栏目或指定栏目
[e:loop={"select * from {$dbtbpre}ecms_news_doc where classid=$GLOBALS[navclassid] order by id desc limit 20",0,24,0}] <li> <?=$bqno?>、<a href="<?=$bqsr[classurl]?>" title="<?=$bqsr[classname]?>"><?=$bqsr[classname]?></a> <a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],40)?></a> </li> [/e:loop]
注释:指定多个栏目用 classid=$GLOBALS[navclassid] 替换为 classid id (34,35,36,37))
3、调用指定信息
[e:loop={"select * from {$dbtbpre}ecms_news_doc where classid=34 and id=462 order by id desc limit 20",0,24,0}] <li> <?=$bqno?>、<a href="<?=$bqsr[classurl]?>" title="<?=$bqsr[classname]?>"><?=$bqsr[classname]?></a> <a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],40)?></a> </li> [/e:loop]
3、调用指定范围的信息
[e:loop={"select * from {$dbtbpre}ecms_news_doc where id<=462 and id>=262 order by id desc limit 20",0,24,0}] <li> <?=$bqno?>、<a href="<?=$bqsr[classurl]?>" title="<?=$bqsr[classname]?>"><?=$bqsr[classname]?></a> <a href="<?=$bqsr[titleurl]?>" title="<?=$bqr[title]?>"><?=esub($bqr[title],40)?></a> </li> [/e:loop]