为了账号安全,请及时绑定邮箱和手机立即绑定

php laravel框架

php laravel框架

PHP
慕码人4566280 2017-10-27 09:08:58
select tui.*,count(users.id) as number from (select a.uid,a.id as tuiguang_id,a.name,u.tel,u.nickname,case when sum(al.tui_money) is null then 0 else sum(al.tui_money) end as shouyi,case when agent.a_gongsi is null then '直属创骐平台' else agent.a_gongsi end as gongsi from admin as a left join users as u on u.id = a.uid left join user_acount_log as al on al.tuiguang_id = a.id left join agent on agent.aid = a.agentid where a.identity='1' and a.is_tuiguangyuan='0' group by a.uid) as tui left join users on users.tuiguang_id = tui.tuiguang_id group by tui.tuiguang_id 以上sql语句转成laravel的连贯操作,怎么弄?
查看完整描述

1 回答

?
cookies1992

TA贡献4条经验 获得超2个赞

不用想了,用原生接口

查看完整回答
2 反对 回复 2018-03-18
  • 1 回答
  • 0 关注
  • 1200 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信