麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁(yè) > CMS > Discuz > 正文

靈動(dòng)標(biāo)簽調(diào)用外部數(shù)據(jù)|如Discuz、DiscuzX、PHPwind

2024-07-09 22:55:07
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
用靈動(dòng)標(biāo)簽調(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ù)庫(kù)名稱(chēng)。
limit 10為顯示貼子數(shù)量。
如果用偽靜態(tài)地址可以用:/bbs/thread-<?=$bqr[tid]?>-1-1.html 
如果指定單個(gè)版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.cdb_threads where fid=版塊ID order by tid desc limit 10
如果指定多個(gè)版塊的貼子,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ù)庫(kù)名稱(chēng)。
例三:調(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ù)庫(kù)名稱(chēng)。
limit 10為顯示貼子數(shù)量。
如果用偽靜態(tài)地址可以用:/bbs/thread-<?=$bqr[tid]?>-1-1.html
如果指定單個(gè)版塊的貼子,SQL用:select tid,subject,dateline from discuzdb.pre_forum_thread where fid=版塊IDorder by tid desc limit 10
如果指定多個(gè)版塊的貼子,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ù)庫(kù)名稱(chēng)。
例五:調(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ù)庫(kù)名稱(chēng)。
limit 10為顯示貼子數(shù)量。
如果用偽靜態(tài)地址可以用:/bbs/read-htm-tid-<?=$bqr[tid]?>.html
如果指定單個(gè)版塊的貼子,SQL用:select tid,subject,postdate from phpwinddb.pw_threads where fid=版塊ID order by tid desc limit 10
如果指定多個(gè)版塊的貼子,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ù)庫(kù)名稱(chēng)。
其他說(shuō)明:
1、帝國(guó)CMS的數(shù)據(jù)庫(kù)帳號(hào)要有select權(quán)限查詢(xún)對(duì)應(yīng)數(shù)據(jù)庫(kù)的表,才能讀取成功。
2、SQL調(diào)用支持調(diào)用mysql數(shù)據(jù)庫(kù)的所有數(shù)據(jù),上面只是舉了幾個(gè)例子。

發(fā)表評(píng)論 共有條評(píng)論
用戶(hù)名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 欧美大电影免费观看 | 久久久精品视频免费看 | 久久性生活免费视频 | www中文在线 | 高清做爰免费无遮网站挡 | 爽爽淫人综合网网站 | 草草视频免费 | 国产精品视频专区 | 在线成人一区二区 | 免费黄网站在线播放 | 久久噜噜噜| 久久精品视频2 | 国产一级一国产一级毛片 | 99国产精品欲a | 亚洲小视频在线 | 久久看免费视频 | 永久av在线免费观看 | 日本aaaa片毛片免费观看视频 | 欧美一级不卡视频 | 日本网站一区 | 国产乱子视频 | 在线成人www免费观看视频 | 欧美激情 在线播放 | 久久久久久久久久网 | 叉逼视频| 一级毛片大片 | 国产99久久久国产精品 | 日韩欧美色综合 | 91av在线免费观看 | 日韩欧美精品中文字幕 | 欧美成人鲁丝片在线观看 | 国产精品久久久久久久久久久久久久久 | 久久久久久久99 | 视频一区二区三区在线播放 | 欧洲伊人网 | 国产精品久久久久久久久久久久久久久久 | 久久手机在线视频 | 国产一级片91 | 欧美精品一区二区久久 | 成人在线视频在线观看 | 特片网久久 |