So, to get the last 24 hour request, I use something like this
SELECT COUNT(*) AS cnt FROM `mytable` WHERE timestamp >= DATE_SUB(NOW(), INTERVAL 1 DAY)
where timestampis the table field with timestamps.
but how can I get the interval between 2 days and yesterday. So
today is 24 years old. I want a request between 22 ian (00:00) and 23 ian (00:00)
source
share