帝國CMS靈動標簽SQL調用同時調用多條廣告(不實用,不如js靈活)
發布時間:2019-10-11 來源:未知 瀏覽: 關鍵詞:
用:select * from phome_enewsad where adid in (廣告ID1,廣告ID2,....)
實例:
[e:loop={"select * from phome_enewsad where adid in (1,2,3) and t=0 order by adid desc limit 20",0,24}]
<a href="<?=$bqr[url]?>" target="_blank" title="<?=$bqr[title]?>"><img src="<?=$bqr[picurl]?>"><?=$bqr[picurl]?></a><br>
[/e:loop]
and t=0 可不用加
>phome_enewsad 數據表字段解釋(廣告表)
------------------------------------------------------------
> 字段名 解釋 附加說明
> adid 廣告ID
> picurl 文字內容或圖片地址
> url 鏈接地址
> pic_width 圖片寬度
> pic_height 圖片高度
> onclick 點擊數
> classid 分類ID
> adtype 廣告類型
> title 廣告名稱
> target 新窗口打開
> alt 提示文字
> starttime 廣告開始時間
> endtime 廣告過期時間
> adsay 廣告注釋
> titlefont 文字加粗
> titlecolor 文字顏色
> htmlcode HTML廣告內容
> t 廣告模式 0為圖片廣告,1為文字廣告,2為HTML廣告,3為彈出廣告
> ylink 顯示原鏈接
> reptext 廣告過期后顯示內容
實例:
[e:loop={"select * from phome_enewsad where adid in (1,2,3) and t=0 order by adid desc limit 20",0,24}]
<a href="<?=$bqr[url]?>" target="_blank" title="<?=$bqr[title]?>"><img src="<?=$bqr[picurl]?>"><?=$bqr[picurl]?></a><br>
[/e:loop]
and t=0 可不用加
>phome_enewsad 數據表字段解釋(廣告表)
------------------------------------------------------------
> 字段名 解釋 附加說明
> adid 廣告ID
> picurl 文字內容或圖片地址
> url 鏈接地址
> pic_width 圖片寬度
> pic_height 圖片高度
> onclick 點擊數
> classid 分類ID
> adtype 廣告類型
> title 廣告名稱
> target 新窗口打開
> alt 提示文字
> starttime 廣告開始時間
> endtime 廣告過期時間
> adsay 廣告注釋
> titlefont 文字加粗
> titlecolor 文字顏色
> htmlcode HTML廣告內容
> t 廣告模式 0為圖片廣告,1為文字廣告,2為HTML廣告,3為彈出廣告
> ylink 顯示原鏈接
> reptext 廣告過期后顯示內容
責任編輯:實速科技