public function getWxChildList()
{
$response['errcode'] = 202;
$response['errmsg'] = '查询失败';
if(IS_POST)
{
$id = I('post.id');
$res = M('TOpChildwx')
->field('id,perid,cname,CONVERT(varchar(120), register_time, 23) as time,user_status,wx_code,wx_pwd,shebei_code,shebei_name,register_way,register_code,card_pos,beizhu,status,cost')
->where("id = '{$id}'")
->find();
$equipment = M('t_op_ysdevice')
->alias('a')
->join('t_ma_device b on a.materialId = b.id')
->field('a.id,a.devino,b.ma_desc,b.ma_vector')
->limit(10)
->select();
if(!empty($res)){
$response['errcode'] = 200;
$response['errmsg'] = '查询成功';
$response['data'] = $res;
$response['equipment'] = $equipment;
}
}
$this->ajaxreturn($response);
}
tp的复杂连表
最新推荐文章于 2021-11-26 19:15:48 发布