For the query below, how could I count the number of rows where datesent is less than 24 hours old? (The field datesent is a timestamp).
datesent
T
You can use the DATE_SUB function. Subtract one day from the current date in the where clause.
Something like
DATE_SUB(NOW(), INTERVAL 1 DAY)
EDIT: changed CURTIME() to NOW()