I'm confused. How to get all dates from a month and insert them into a table in a database?
I want to do this with a trigger so when I make a period, ex April 01-04-2016 / 30-04-2016, then in table attendance
it will generate one row for each date.
I have table period
period | start_period | end_period
April | 2016-04-01 | 2016-04-30
and I have table attendance
attendance_date | check_in | check out
2016-04-01 | null | null
..........
2016-04-30 | null | null
How to get all dates between 01-04-2016 and 30-04-2016 and insert them into table attendance
?
period
to insert rows intoattendance
?