0

I'm trying to understand how I can create a query with query builder and have a where value something like

where item=1 and GETDATE() BETWEEN date1 AND date2

Thanks.

1 Answer 1

0

I've found this seems to work.

->whereRaw('? Between b.startDate AND b.endDate', array(now()))

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.