How to write select query with between similar to this with active record?
SELECT * FROM test_tbl WHERE date BETWEEN '$start' and '$end' ORDER BY ID
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AFAIK, there’s no built-in support for
BETWEENYou can do this instead
Or write a helper function that look like this
Later on, you can use that function by calling it like
where_between('test_tbl', $start, $end)