for标签之嵌套循环实例精选
发布时间:2015-10-07 18:10:38接上一篇,轻开B2C电子商务网站用嵌套循环定制展示商品的实例
目的:在一页中显示最多十八件商品,每行显示三件
查询
- <!-- 查询数据和显示列表 -->
- <esql module=base id=list>
- select we_id,we_num,title,price,sale_url,pubdate
- from co_sale inner join
- ( select we_id as tmp_id from co_sale
- where
- catalog in @{pPage:cs}
- order by pubdate desc limit @{pPage:start},@{pPage:length}
- ) as tm1
- on tmp_id=we_id
- </esql>
嵌套循环定制输出
- <for end="@{list:getLength}" step=3>
- <TR valign=top>
- <for bags=list start=
相关文章