Tuesday, 15 April 2014

php - selecting rows that are older than current date in mysql -


I have a mysql table with fields for a start and end date / time.

How do I select lines older than the current date using Php?

The expiration date format is 2009-11-25 08:01:00 and the field type is datetime

The timestamp provided and MySQL are in the same timezone, you can only compare.

  SELECT * FROM tbl WHERE date_col & lt; Now ()  

No comments:

Post a Comment