2
I need to take the difference in days between the current date and the date stored in the bank, subtract this difference by 90 and then check if the result is equal to 7. Where is the error?
whereRaw("90 - (DATEDIFF(now(), 'updated_at')) = 7")
2
I need to take the difference in days between the current date and the date stored in the bank, subtract this difference by 90 and then check if the result is equal to 7. Where is the error?
whereRaw("90 - (DATEDIFF(now(), 'updated_at')) = 7")
1
It would not be so, ie the field updated_at
no quotes, because it is a field of your table:
whereRaw("(90 - (DATEDIFF(now(), updated_at))) = 7")
Browser other questions tagged laravel-eloquent
You are not signed in. Login or sign up in order to post.
I made an answer give a look I believe that is not quotes there, because it is a field!
– novic