
2014-10-14 $≈| 發布者:梁國(guó)芳 §÷₩™ | ™ 查看(kàn):3320次
destoondestoon實現(xiàn)首頁顯示供應、企業(yè)、資訊條數↔±♠(shù)有(yǒu)多(duō)種方法,這(zhè)裡(lǐ)介紹的(dγe)是(shì)直接調用(yòng)php程序代碼進§$行(xíng)查詢。destoon的(de)模闆裡(lǐ)面是(s₩₹hì)支持php的(de)代碼的(de),↕÷↓因此我們可(kě)以直接在模闆裡(lǐ)面查詢出σ 來(lái)即可(kě)。
實現(xiàn)代碼如(rú)下(xià)←©:
|
1
2
3
4
5
6
7
8
|
<ul> {php $sellcount=$db->get_one("select COUNT(*) A÷✔&↑S num FROM ".$DT_PRE."sell WHERE status=3");} <li>共有(yǒu){$sellcount[num]}條供應</li> {php $company=$db->get_one("select COUNT(*) AS num FROM "≥;.$DT_PRE."member WHERE groupid≤✔>5");} <li>共有(yǒu){$company[num]}個(gè)企業(yè)</l÷✔≠©i> {php $newcount=$db->get_one("select COUNT(*) AS num FROM &q≠★uot;.$DT_PRE."article_21 WHERE status=3");} <li>共有(yǒu){$newcount[num]}條資訊</li></ul> |
