Closed projct1 closed 7 years ago
@rorc can you take the resulting query and run the query to see if you are getting your desired result?
@Dylan-DPC As u can see above, result query is and time(remind_at) between 10
(without 12)
Actual result must be and time(remind_at) between 10 and 12
what happens with whereBetween
?
@rorc According to the laravel docs, whereTime only accepts an int as the third parameter, it seems like whereTime was never designed to be used with the between operator
After some testing, none of the functions that use Illuminate\Database\Query\Builder::addDateBasedWhere, accept an array as third argument
https://laravel.com/api/5.4/Illuminate/Database/Query/Builder.html#method_whereTime
@stemis Yea, and we can improve this, adding between
to $operator
?
@rorc you can use whereBetween('time', 10, 12);
Description:
This not working, because generates this sql:
... and time(remind_at) between 10
Of couse, we can add methodswhereDateBetween
,whereTimeBetween
, etc)