标签:decode str array 转换 member json join list row
//json 强制转换为array
$arr[$key][‘checkpro‘] = json_decode($val[‘checkpro‘],JSON_FORCE_ARRAY);
$arr[$key][‘messpro‘] = json_decode($val[‘messpro‘],JSON_FORCE_ARRAY);
{$Think.lang.$key}
$pro = D(‘Project‘);
$count = $pro->where(‘status != -1‘)->count();
$page = new \Think\Page($count,8);
$data = $pro->alias(‘p‘)
->field(‘m.realname,p.*,d.dname‘)
->where(‘p.status !=-1 ‘)
->join(‘ left join ganen_member m on p.charge = m.uid‘)
->join(‘ left join ganen_department d on p.pro_id = d.did‘)
->limit($page->firstRow.‘,‘.$page->listRows)
->select();
$page->setConfig(‘first‘,‘首页‘);
$page->setConfig(‘last‘,‘末页‘);
$page->setConfig(‘prev‘,‘上一页‘);
$page->setConfig(‘next‘,‘下一页‘);
$page->setConfig(‘theme‘,‘%FIRST% %UP_PAGE% %LINK_PAGE% %DOWN_PAGE% %END% %HEADER%‘);
$show = $page->show();
$this->assign(‘_page‘,$show);
$this->assign(‘_list‘, $data);
$this->meta_title = ‘用户信息‘;
$this->display();
标签:decode str array 转换 member json join list row
原文地址:http://www.cnblogs.com/simadongyang/p/7465813.html