How to specify
NOW() BETWEEN col1 AND col2
using Kohana Database?
$this->where(new Database_Expression('NOW()'), 'BETWEEN', array('col1', 'col2'));
obviously treats the values as a string literals, not a column names
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.
Did you try
$this->where(DB::expr('NOW() BETWEEN col1 AND col2'));Edit:
$this->where('NOW()', 'BETWEEN', DB::expr('col1 AND col2'));