日期:2014-05-16 浏览次数:20468 次
$left_type = M('type')->where("`pid`='2'")->order('`order` desc,`id` desc')->limit(0,10)->select();
foreach($left_type as $v){
$left_goods = M('goods')->where("`pid`='$v[id]'")->order('`order` desc,`id` desc')->limit(0,10)->select();
}
$type_list = M("Type")->where()->order()->limit()->select();
foreach($type_list as $key=>$val){
$type_list['items'] = M("Goods")->where("pid={$val['id']}")->select();
}
<ul>
<volist name="type_list" id="vo">
<li>{$vo.title}
<ul>
<volist name="vo.items" id="it">
<li>{$it.name}</li>
</volist>
</ul>
</li>
</volist>
</ul>