Thursday, February 3, 2011

Cervical Position Right Before Period

MySQL: query records for yesterday and today

Per estrarre i record della tabella 'table' in cui il campo 'time_field' contenga una data compresa tra ieri e oggi, usare la query seguente:
SELECT * FROM table WHERE time_field >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)

0 comments:

Post a Comment