2010-06-03 65 views

回答

4
SELECT * FROM log WHERE EventTime >= DATE_SUB(CURDATE(), INTERVAL 1 DAY); 
+0

我知道有另一種語法更類似於我最初發布。 – ripper234 2010-06-03 12:28:34

1
SELECT * FROM log WHERE SUBDATE(NOW(), 1) < EventTime 

或者只從今天選擇的:

SELECT * FROM log WHERE DATE(NOW()) = DATE(EventTime)