发布时间:2018-04-12 编辑:钰歆博客 阅读(787)
$auth_group = M('AuthGroup')->where( array('status'=>array('egt','0')))->getfield('id,id,title,rules');
print_r($auth_group);
输出:
Array
(
[1] => Array
(
[id] => 1
[title] => 管理员
[rules] => 1,2,4,5,6,40,43,44,45,46,47
)
[2] => Array
(
[id] => 2
[title] => 普通用户
[rules] =>
)
)
会做全表搜索,并且默认把第一个field作为键名
标签: