function add() { $agentM = M('Agent'); $id = $_REQUEST['id']; $data = $agentM->where('id=' . $id)->find(); //echo $agentM->getLastSql();exit; $this->assign('data', $data); $serviceM = M('Service'); $list = $serviceM->where('status=1')->select(); $this->assign('list', $list); $this->assign('province', getLinkageList()); $this->display(); }
function add() { $Store_mod = M('Store'); //商家表 $seller_cat_mod = M('Store_cate'); //商家类型表 $id = $_REQUEST['id']; $data = $Store_mod->where('id=' . $id)->find(); //显示商家详细 $where['status'] = 1; $where['type'] = 50; $storelist = $Store_mod->where($where)->select(); //获取总店商家 $cate_list = $seller_cat_mod->where("status=1")->order("sort DESC")->select(); //分类查询 //echo $seller_cat_mod->getLastSql(); $serviceM = D('ServiceView'); //产品表 //echo $this->getSessionId('id'); $list = $serviceM->where('pid=' . $this->getSessionId('id'))->select(); //查询产品 $this->assign('list', $list); $this->assign('data', $data); $this->assign('cate_list', $cate_list); // 商家分类 $this->assign('storelist', $storelist); $this->assign('province', getLinkageList()); //省份列表 $this->display(); }