精華 帝國PHP系統(tǒng)CMS如何用靈動標簽調(diào)用新聞模型所有字段?
<code class="php plain">[e:loop={</code><code class="php string">"select * from [!db.pre!]ecms_news order by id desc"</code><code class="php plain">,0,24,0}]</code>
???
<li><span><?=
date
(
'Y-m-d'
,
$bqr
[newstime])?></span><a href=
"<?=$bqsr['titleurl']?>"
?target=
"_blank"
><?=
$bqr
[
'title'
]?></a></a></li>
[/e:loop]
號是查詢所有字段,為了減輕數(shù)據(jù)庫查詢的負擔,這里建議改成需要展示的列表字段,比如newstime,title,titleurl這三個字段就可以了。