select CONCAT('2020-02','-',help_topic_id +1) day,help_topic_id,day(last_day( CONCAT('2020-02','-1'))) as dayT
from mysql.help_topic
where help_topic_id < day(last_day(CONCAT('2020-02','-1')))
order by help_topic_id
其中'2020-02'是传入得值,last_day( CONCAT('2020-02','-1'))是查询当月最后一天
day(last_day( CONCAT('2020-02','-1')))是获取当前月份一共有多少天