One option would be to wrap
DATE(), and then compare to
SELECT * FROM log WHERE DATE(created_at) = CURDATE();
But this has the drawback of precluding the possibility of using an index on the
created_at column. We could also phrase this as follows:
SELECT * FROM log WHERE created_at >= CURDATE() AND created_at < CURDATE() + INTERVAL 1 DAY;
This would allow an index to be used on
created_at, though it is a bit more verbose.