这个圆法并非很实用,因为不如JS直接调用来的圆便,可是用正在一些特殊需求里是可以的,写以下代码留待有需要的小火伴参考!
用: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 广告过期后显现内容
转载请注明: 帝国CMS模板 » 帝国CMS灵动标签SQL调用同时调用多条广告