使用sql标签在商品内容页调用品牌详情,如品牌名称,图片,介绍等
转自:http://hi.baidu.com/wufeng20128/item/f3a69295016a08df1a49df38
sql标签名称内容页显示商品品牌详情sql语句:select top 1 b.id,b.brandname,b.intro,b.photourl from KS_ClassBrand B Inner Join KS_Product P on b.id=p.brandid where p.id={$CurrInfoID}Ajax调用:否sql循环体:
- <strong>品牌介绍:</strong><BR/>
- [loop=1]
- <strong>品牌名称:</strong>{$Field(brandname,Text,0,...,0,)}<br/>
- <strong>品牌图片:</strong><img src='{$Field(photourl,Text,0,...,0,/images/nopic.gif)}'/><br/>
- <strong> 查看更多同品牌商品:</strong><a href='/shop/search_list.asp?brandid={$Field(id,GetInfoUrl,5,2)}' target='_Blank'>查看</a><br/>
- <strong>品牌介绍:</strong>{$Field(intro,Text,0,...,0,)}
- [/loop]
商品内容页模板里调用: {SQL_内容页显示商品品牌详情()}