Good day, I have this SQL statement and I'm having a difficulty on how to convert this in Laravel Query.
I read the docs in http://laravel.com/docs/4.2/queries and I'm confused. Any help would do.
SELECT count(*) FROM `transactions` WHERE `borrower_id` = 2
AND `book_id` = 2 AND (
(
`reservedDate` IS NOT NULL
and `borrowedDate` IS NULL
)
OR (
`borrowedDate` IS NOT NULL
AND `returnedDate` IS NULL
)
)