order('`order` desc,`id` desc')->limit(0,10)->select();forea">
时间:2021-07-01 10:21:17 帮助过:7人阅读
$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();
}