• <s id="1jjov"><bdo id="1jjov"></bdo></s>
    <s id="1jjov"></s>

    
    

      <sup id="1jjov"></sup>
        1. <s id="1jjov"><nobr id="1jjov"><ins id="1jjov"></ins></nobr></s>
           
          售前咨詢QQ:QQ412395521
          業(yè)務(wù)合作QQ:QQ627174919
          位置:首頁 > 知新 > 帝國CMS > 模板制作

          靈動標簽調(diào)用外部數(shù)據(jù)

          時間:2011-06-14 09:53:29
          帝國CMS的標簽的SQL查詢調(diào)用支持調(diào)用mysql數(shù)據(jù)庫的所有數(shù)據(jù):
           
          用靈動標簽調(diào)用外部數(shù)據(jù):
          例一:調(diào)用Discuz的最新貼子

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,dateline from discuzdb.cdb_threads order by tid desc limit 10",10,24,0}]
          <tr><td>
          <a href="/bbs/viewthread.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[dateline])?>)
          </td></tr>
          [/e:loop]
          </table>

          discuzdb.cdb_threads為Discuz的貼子表名,其中“discuzdb”為Discuz的數(shù)據(jù)庫名稱。
          limit 10為顯示貼子數(shù)量。
          如果用偽靜態(tài)地址可以用:/bbs/thread-<?=$bqr[tid]?>-1-1.html
          如果指定單個版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.cdb_threads where fid=版塊ID order by tid desc limit 10
          如果指定多個版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.cdb_threads where fid in (1,2,3) order by tid desc limit 10
          例二:調(diào)用Discuz的最新貼子(含調(diào)用論壇版塊名)

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,dateline,fid from discuzdb.cdb_threads order by tid desc limit 10",10,24,0}]
          <?php
          $fr=$empire->fetch1("select name from discuzdb.cdb_forums where fid='$bqr[fid]'");
          ?>

          <tr><td>
          [<?=$fr[name]?>] <a href="/bbs/viewthread.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[dateline])?>)
          </td></tr>
          [/e:loop]
          </table>

          discuzdb.cdb_forums為Discuz的版塊表名,其中“discuzdb”為Discuz的數(shù)據(jù)庫名稱。
          例三:調(diào)用DiscuzX的最新貼子

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,dateline from discuzdb.pre_forum_thread order by tid desc limit 10",10,24,0}]
          <tr><td>
          <a href="/bbs/forum.php?mod=viewthread&tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[dateline])?>)
          </td></tr>
          [/e:loop]
          </table>

          discuzdb.pre_forum_thread為DiscuzX的貼子表名,其中“discuzdb”為DiscuzX的數(shù)據(jù)庫名稱。
          limit 10為顯示貼子數(shù)量。
          如果用偽靜態(tài)地址可以用:/bbs/thread-<?=$bqr[tid]?>-1-1.html
          如果指定單個版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.pre_forum_thread where fid=版塊ID order by tid desc limit 10
          如果指定多個版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.pre_forum_thread where fid in (1,2,3) order by tid desc limit 10
          例四:調(diào)用DiscuzX的最新貼子(含調(diào)用論壇版塊名)

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,dateline,fid from discuzdb.pre_forum_thread order by tid desc limit 10",10,24,0}]
          <?php
          $fr=$empire->fetch1("select name from discuzdb.pre_forum_forum where fid='$bqr[fid]'");
          ?>

          <tr><td>
          [<?=$fr[name]?>] <a href="/bbs/forum.php?mod=viewthread&tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[dateline])?>)
          </td></tr>
          [/e:loop]
          </table>

          discuzdb.pre_forum_forum為DiscuzX的版塊表名,其中“discuzdb”為DiscuzX的數(shù)據(jù)庫名稱。
          例五:調(diào)用PHPwind的最新貼子

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,postdate from phpwinddb.pw_threads order by tid desc limit 10",10,24,0}]
          <tr><td>
          <a href="/bbs/read.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[postdate])?>)
          </td></tr>
          [/e:loop]
          </table>

          phpwinddb.pw_threads為phpwind的貼子表名,其中“phpwinddb”為phpwind的數(shù)據(jù)庫名稱。
          limit 10為顯示貼子數(shù)量。
          如果用偽靜態(tài)地址可以用:/bbs/read-htm-tid-<?=$bqr[tid]?>.html
          如果指定單個版塊的貼子,SQL用:select tid,subject,postdate from phpwinddb.pw_threads where fid=版塊ID order by tid desc limit 10
          如果指定多個版塊的貼子,SQL用:select tid,subject,postdate from phpwinddb.pw_threads where fid in (1,2,3) order by tid desc limit 10
          例六:調(diào)用PHPwind的最新貼子(含調(diào)用論壇版塊名)

          <table width="100%" border="0" cellspacing="1" cellpadding="3">
          [e:loop={"select tid,subject,postdate,fid from phpwinddb.pw_threads order by tid desc limit 10",10,24,0}]
          <?php
          $fr=$empire->fetch1("select name from phpwinddb.pw_forums where fid='$bqr[fid]'");
          ?>

          <tr><td>
          [<?=$fr[name]?>] <a href="/bbs/read.php?tid=<?=$bqr[tid]?>" target="_blank"><?=$bqr[subject]?></a> (<?=date('Y-m-d',$bqr[postdate])?>)
          </td></tr>
          [/e:loop]
          </table>

          phpwinddb.pw_forums為phpwind的版塊表名,其中“phpwinddb”為phpwind的數(shù)據(jù)庫名稱。
           
          其他說明:
          1、帝國CMS的數(shù)據(jù)庫帳號要有select權(quán)限查詢對應(yīng)數(shù)據(jù)庫的表,才能讀取成功。
          2、SQL調(diào)用支持調(diào)用mysql數(shù)據(jù)庫的所有數(shù)據(jù),上面只是舉了幾個例子。
          旗下其它產(chǎn)品:【帝國備份王】    【EBMA系統(tǒng)】    【帝國下載系統(tǒng)
          Powered by EmpireCMS
          版權(quán)所有 ©2002-2024 EmpireSoft Inc.
        2. <s id="1jjov"><bdo id="1jjov"></bdo></s>
          <s id="1jjov"></s>

          
          

            <sup id="1jjov"></sup>
              1. <s id="1jjov"><nobr id="1jjov"><ins id="1jjov"></ins></nobr></s>
                曰夲卖婬片免费看9.1 | 亚洲无码破解在线观看 | 亚洲一区欧美 | 欧美操片在线观看 | 成人少妇MCA | 日本中文字幕中文翻译歌词 | 粉嫩99精品99久久久久久桃色 | 国产视频一区二区三区四区 | www骚逼 | 国产激情有吗在线观看 |