联系官方销售客服
1835022288
028-61286886
请教一下,下面代码错在哪?
// 查询会员id为2的会员组id--gid,再得到会员组的名称和devices信息
$v = \Phpcmf\Service::M()->table('member_group_index')->where('uid', 2)->getAll();
$data = \Phpcmf\Service::M()->table('member_group')->where('id', $v['gid'])->getAll();
//遍历数组
foreach ($data as $t) {
$return[] = [
'name' => $t['name'],
'devices' => $t['devices'],
];
}