think-orm
think-orm copied to clipboard
hasWhere无法多次使用
想根据多个模型的字段进行模糊查询数据,hasWhere只有第一次生效
Goods::where($where)
->hasWhere()
->hasWhere()
hasWhere只能调用一次。
一个关联的查询,用hasWhere的数组条件或者闭包条件。
多个表的关联查询,直接用withJoin,然后用where表前缀查询。
where('a.status',0)->where('b.status',1)
hasWhere只能调用一次。
一个关联的查询,用hasWhere的数组条件或者闭包条件。
多个表的关联查询,直接用withJoin,然后用where表前缀查询。
where('a.status',0)->where('b.status',1)
感谢。