mysql: first and last days of months
SELECT
date_sub(CURDATE(), INTERVAL DAYOFMONTH(CURDATE()) -1 day) FIRST_DAY_OF_MONTH,
last_day( CURDATE() ) LAST_DAY_OF_MONTH ,
date_add(date_sub(CURDATE(), INTERVAL DAYOFMONTH(CURDATE()) -1 day), interval 1 month) FIRST_DAY_OF_NEXT_MONTH