-
Notifications
You must be signed in to change notification settings - Fork 11.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.5] Remove the between operator in basic where clause #22182
Conversation
Should it not just be fixed? |
Like |
In Illuminate\Database\Query\Builder::where something like
would be useful in case of array of wheres
I know I can use '<=', '>=' operators instead of 'between' in this case but still. |
@aleksandrlat I'm ok with both ways, @taylorotwell what do you think? |
I kind of agree people should just use whereBetween? |
@themsaid this broke my code. Took me a few hours to track it down 😢 I have a join with a $join->on('b.lft', 'BETWEEN', DB::raw('a.lft AND a.rgt')) This is used to query a nested set table. This used to generate: join b on `b`.`lft` BETWEEN a.lft AND a.rgt but now it generates: join b on `b`.`lft` = `BETWEEN` ...which obviously leads to this error:
I haven't touched this code in years, and it has worked flawlessly. This change broke it 😞 |
Thanks for a breaking change in a stable version 👍 |
* We need this to use the operator in a having clause. * On Laravel 5.5, this operator was removed by laravel#22182 * On Laravel 5.7 there is a new havingBetween method that we can use instead laravel#26758
It's currently not working and generating wrong sql:
Will generate