SELECT
@num:=@num+1 NO,
substr(DATE_ADD(DATE_FORMAT((DATE_ADD(curdate(),interval -day(curdate())+1 day)), '%Y-%m-%d'),INTERVAL @num DAY),1) as TMSQ
FROM
mysql.help_topic a,
(select @num:=-1) n
WHERE
@num < 31