Posts Tagged ‘nbsp’

Here is an example that uses date functions. The following query selects all rows with a date_col value from within the last 30 days:

SELECT something FROM tbl_name WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) <= date_col;

The query also selects rows with dates that lie in the future.

And try also that

SELECT   * FROM tbl_name   WHERE  date_col  > ‘2013/07/03’ order by date_col   limit 100