dede呼叫非同一個數據庫的DZ論壇的帖子
阿新 • • 發佈:2018-12-30
{dede:php runphp="yes"} $GLOBALS['cfg_dbname']="資料庫名"; $tsql = new DedeSql(false); $tags = ''; $tsql->SetQuery("SELECT cdb_forums.name,cdb_threads.fid,cdb_threads.tid,cdb_threads.subject FROM cdb_threads,cdb_forums where cdb_threads.fid=cdb_forums.fid and cdb_threads.digest>0 and cdb_threads.displayorder!=-1 order by cdb_threads.lastpost desc LIMIT 0,10"); $tsql->Execute('t'); $tg_ko=1; while($tgrow = $tsql->GetArray('t',MYSQL_ASSOC)){ $arr_tgrand=array('5f8b69','2a5c8b','c02846','b17134','006d57','666666','666666'); shuffle($arr_tgrand); $tgtags .= '<li id="c_po'.$tg_ko.'"><a href="
本文轉自小豬站長學院,原文地址: