I have a table in database and a column named timedate
the time is stored like this in this column: 2013-05-25 12:15:25
I need to SELECT
the row with the time within last 15 minutes only; so in the case above
SELECT if timedate is after
2013-05-25 12:00:25
I tried:
TO_DAYS(NOW()) - TO_DAYS('timedate') < 15
but it didn't work
SELECT
*
FROM
`column`
WHERE
`name` = 'name'
AND `family` = 'family'
AND (
`test1` = 'test1 value'
|| `test2` = 'test2 value'
|| `test3` = 'test3 value'
)
AND TO_DAYS(NOW()) - TO_DAYS('timedate') < 15
LIMIT
1