免费一级码无码婬片AA,多姿,国产成人精品日本亚洲18图 ,亚洲欧美视频一区,久久久久国产精品一区

做網站找實速,專業網站制作設計平臺
首頁 > 課堂 > 網站技術 > 詳情
網站標簽 / Tags

帝國CMS靈動標簽調用多表多模型調用文章

2020-02-16 16:32:16   來源:實速網絡|網站建設|網站設計|網站優化|網站仿制|網站SEO|網站推廣|空間域名|主機VPS|服務器|網站源碼|網站模版   瀏覽: 次
帝國CMS靈動標簽調用多表多模型調用文章 發布時間:2019-10-11 來源:未知 瀏覽: 關鍵詞:

帝國CMS靈動標簽調用多表多模型調用文章

發布時間:2019-10-11 來源:未知 瀏覽: 關鍵詞:


靈動標簽調用多表多模型調用文章

1、調用多模型的最新文章
[e:loop={'select * from ( 
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_movie where newstime union 
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_news where newstime union 
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_photo where newstime union 
select id,classid,titleurl,filename,title,newstime,titlepic from phome_ecms_flash where newstime union 
select id,classid,titleurl,filename,title,newstime,titlepic from phome_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]

帝國CMS多表調用最新信息,該演示代碼為默認數據表下全站最新10條圖片信息,自己根據需求可以附加條件,實現全站點擊,全站頭條,全站推薦等等.

---------------------------------------------------------------------------------
2、調用多模型的最新文章
[e:loop={'
select title,titleurl,titlepic from [!db.pre!]ecms_photo Union All 
select title,titleurl,titlepic from [!db.pre!]ecms_download Union All 
select title,titleurl,titlepic from [!db.pre!]ecms_news',0,24,0}]
<a href="<?=$bqsr['titleurl']?>" target="_blank"><?=$bqr['title']?></a> <br>
[/e:loop]

注釋:以上調用的是(圖片模型:photo、下載模型:download、新聞模型:news)三個模型的文章
       三個模型用“Union All”連接調用

若指定欄目用:where classid in(46,47,51),
若調用推薦在其后追加:and isgood=1,
若指定調用條數在其后追加:limit 10
責任編輯:實速科技