Is there a way to use codeigniters active record system to construct a query that will search for rows that fall between two dates (rows has an added field and I want to supply the query a start and end date)?
I have checked the documentation knowing that mysql includes a between keywork for such things but can’t see anything related to it.
Thanks in advance
You can just use two
where()methods. They will be bound viaAND, so if the first is ‘everything after’ and the second is ‘everything before’, you get a ‘everything in between’.If you want to use SQL goodies like
NOW(), usewhere()s third parameter, and set it toFalse.