作者 刘朕
1 个管道 的构建 通过 耗费 0 秒

调试

... ... @@ -27,13 +27,13 @@ class TestController extends HomeBaseController
$indent_data = Db::query("select id,uid,money,indent_id,count(indent_id) count from `cmf_money_income` group by indent_id having count(indent_id) >= 4 order by indent_id desc");
$a = [];
foreach ($indent_data as $v) {
$a[] = $v;
// if($v['count'] == 4) {
// if($v['money'] > 0) {
// $v['nickname'] = Db::name('user')->where('id',$v['uid'])->value('user_nickname');
// $a[] = $v;
// }
// }
if($v['count'] == 4) {
$data = Db::name('money_income')->where('money','>',0)->where('indent_id',$v['indent_id'])->find();
if($data) {
$data['nickname'] = Db::name('user')->where('id',$v['uid'])->value('user_nickname');
$a[] = $data;
}
}
}
print_r($a);exit;
// $data = Db::name('my_user')->where(['status'=>3,'inviter_phone'=>['neq','']])->select()->toArray();
... ...