MYSQL query where curdate() < 25 doesn't work -


i wonder when execute query like

update club_name set wmmr_report=0 curdate() > 15  

it executes fine , update record. when run same query like

update club_name set wmmr_report=0 curdate() < 25 

the query returns 0 rows effected. assuming current date 19th.

thanks.

you want use day function

update club_name set wmmr_report=0 day(curdate()) < 25 

day() synonym dayofmonth

dayofmonth(date)

returns day of month date, in range 1 31, or 0 dates such '0000-00-00' or '2008-00-00' have 0 day part


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -