帝國(guó)CMS靈動(dòng)標(biāo)簽SQL調(diào)用同時(shí)調(diào)用多條廣告
發(fā)布時(shí)間:2019-10-12 來(lái)源:未知 瀏覽: 關(guān)鍵詞:
這個(gè)方法并不是很實(shí)用,因?yàn)椴蝗鏙S直接調(diào)用來(lái)的方便,但是用在一些特殊需求里是可以的,寫(xiě)以下代碼留待有需要的小伙伴參考!
用:select * from phome_enewsad where adid in (廣告ID1,廣告ID2,....)
實(shí)例:
[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 數(shù)據(jù)表字段解釋(廣告表)
------------------------------------------------------------
> 字段名 解釋 附加說(shuō)明
> adid 廣告ID
> picurl 文字內(nèi)容或圖片地址
> url 鏈接地址
> pic_width 圖片寬度
> pic_height 圖片高度
> onclick 點(diǎn)擊數(shù)
> classid 分類ID
> adtype 廣告類型
> title 廣告名稱
> target 新窗口打開(kāi)
> alt 提示文字
> starttime 廣告開(kāi)始時(shí)間
> endtime 廣告過(guò)期時(shí)間
> adsay 廣告注釋
> titlefont 文字加粗
> titlecolor 文字顏色
> htmlcode HTML廣告內(nèi)容
> t 廣告模式 0為圖片廣告,1為文字廣告,2為HTML廣告,3為彈出廣告
> ylink 顯示原鏈接
> reptext 廣告過(guò)期后顯示內(nèi)容
用:select * from phome_enewsad where adid in (廣告ID1,廣告ID2,....)
實(shí)例:
[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 數(shù)據(jù)表字段解釋(廣告表)
------------------------------------------------------------
> 字段名 解釋 附加說(shuō)明
> adid 廣告ID
> picurl 文字內(nèi)容或圖片地址
> url 鏈接地址
> pic_width 圖片寬度
> pic_height 圖片高度
> onclick 點(diǎn)擊數(shù)
> classid 分類ID
> adtype 廣告類型
> title 廣告名稱
> target 新窗口打開(kāi)
> alt 提示文字
> starttime 廣告開(kāi)始時(shí)間
> endtime 廣告過(guò)期時(shí)間
> adsay 廣告注釋
> titlefont 文字加粗
> titlecolor 文字顏色
> htmlcode HTML廣告內(nèi)容
> t 廣告模式 0為圖片廣告,1為文字廣告,2為HTML廣告,3為彈出廣告
> ylink 顯示原鏈接
> reptext 廣告過(guò)期后顯示內(nèi)容
責(zé)任編輯:實(shí)速科技