調(diào)用多模型的最新文章
[e:loop={'select * from ( select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_movie where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_news where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_photo where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_flash where newstime union select id,classid,titleurl,filename,title,newstime,titlepic from [!db.pre!]ecms_article where newstime ) a order by newstime desc limit 10',10,24,1}] <a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br> [/e:loop]
注釋:以上多個(gè)模型用“Union”連接調(diào)用
帝國(guó)CMS多表調(diào)用最新信息,該演示代碼為默認(rèn)數(shù)據(jù)表下全站最新10條圖片信息,自己根據(jù)需求可以附加條件,實(shí)現(xiàn)全站點(diǎn)擊,全站頭條,全站推薦等等.
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!
轉(zhuǎn)載請(qǐng)注明: 介紹下帝國(guó)CMS用靈動(dòng)標(biāo)簽調(diào)用多表多模型文章信息的寫法