I have a calendar table which days may be filled with meetings; my main SQL returns these results :
DAY | MEETINGS
--------------
20 | 2
21 | 2
25 | 1
I'm trying to find a way to have ALL days of the month listed in the results, and the idea is to try something like this :
SELECT (@day := @day + 1) AS `Day` FROM (SELECT @day := 0) AS `Month`;
and add it in the proper way inside the main SQL, but it is not the right answer I'm expecting, so I'm asking if there is a way to put a do/loop/while command INSIDE the SELECT statement, something like this :
SELECT (DO @day := @day + 1 UNTIL @day <= 31) AS `Day` FROM (SELECT @day := 0) AS `Month`;