sql

sql问题

DB::select("select album.,(select count() from article where article.state = 1 and article.cate = album.id) as cot from album,article where album.id!=0 and album.update_tm != 0 group by album.id")

如何转换为->where()这种呢
已邀请:

Christian

赞同来自:

可以用Eloquent的模型关联
用query builder很复杂 而且group很损耗性能

要回复问题请先登录注册