SELECT @s :=@s + 1 AS `index`, DATE(DATE_SUB(CURRENT_DATE, INTERVAL @s DAY)) AS `date`
FROM mysql.help_topic,(SELECT @s := -1) temp
WHERE @s < 6
ORDER BY `date`;
SELECT DATE(DATE_SUB(CURRENT_DATE, INTERVAL @s :=@s + 1 DAY)) AS `date`
FROM mysql.help_topic,(SELECT @s := 0) temp
WHERE @s < 7
ORDER BY `date` desc;