//去除掉密码$db = new UserModel();$result = $db->field('password',true)->where("username='{$params['username']}' AND password='{$params['password']}'")->find();
或者指定要的字段的数组
$db = new UserModel();$result = $db->field(['username','create_time'])->where("username='{$params['username']}' AND password='{$params['password']}'")->find();
查询符合条件的多条数据
$db2 = new RoleRightModel();$result2 = $db2->field('right_id')->where('role_id',1)->select();