I have a table containing a timestamp field, `insert_time`

The manual is clear when it comes to selecting records from the past
week or month, I can use:

  SELECT COUNT(*) FROM statistics 
  WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= `insert_time`;

What I am less sure about is how I would select records that had been
inserted to thee table in the previous hour.

I understand the date functions will ignore the hh:mm:ss - will the time
functions ignore the date? Can anyone suggest what function I need for
this select?

Thanks,

Russell.



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to