Wednesday, September 2, 2009

Mysql today in where clause

select * from table where added_on=date(now());

To use this sql you must have used "date" datatype for your table column.
select * from table where added_at=now();

This works fine for "time" columns too .

No comments:

Post a Comment