how to find out number of days in month in mysql
You can combine LAST_DAY with string function
SELECT RIGHT( LAST_DAY( '2003-02-03' ) , 2 )
Try this:
SELECT DAYOFMONTH(LAST_DAY(your_date)) FROM your_table
SELECT DAY(LAST_DAY(yourdate))