You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ActiveRecord $model->or_where() only really works when you have a table where field = value or field = value2. For example if you do $model->where()->where()->or_where() it actually creates the sql as table where (field = value) and (field = value2) or (field = value3) which doesn't work as you would expect it.
Ideally we could pass a closure into where to solve this or at least create some sort of grouping to that the or_where can be applied in the right place with the right grouping.
The ActiveRecord
$model->or_where()
only really works when you have atable where field = value or field = value2
. For example if you do$model->where()->where()->or_where()
it actually creates the sql astable where (field = value) and (field = value2) or (field = value3)
which doesn't work as you would expect it.Ideally we could pass a closure into where to solve this or at least create some sort of grouping to that the
or_where
can be applied in the right place with the right grouping.Code from another framework:
Will produce:
The text was updated successfully, but these errors were encountered: