I have a MySql database that uses a time field to track when the entry was inserted.
Now I want to query the table for entries by a time range.
I would prefer to use MySql to extract the records instead of extracting all records then iterating and comparing time in php.
success on these two kinds of queries:
// this doesn't appear to be working
SELECT * FROM table_name
WHERE DATE(TIME_ROW_START) BETWEEN '".$timestart."' AND DATE(TIME_ROW_END) BETWEEN '".$timeend."';
// this doesn't appear to be working either
SELECT * FROM table_name
WHERE DATE(TIME_ROW_START) >= '".$timestart."'
AND DATE(TIME_ROW_END) <= '".$timeend."';
Is there a way to do this?