wHiTeHaT
10-08-2006, 06:47 PM
Hello @all
I'm working on a project to use database info as a calendar
for example :
Table calendar
calendar_id int(11) No 0 (for all yearday)
did int(11) Nee 0 (for calandarday)
calendar_date date No 0000-00-00 (full date)
1, 1, '2006-01-01'
2, 2, '2006-01-02'
3, 3, '2006-01-03'
4, 4, '2006-01-04'
5, 5, '2006-01-05'
6, 6, '2006-01-06'
7, 7, '2006-01-07'
8, 8, '2006-01-08'
9, 9, '2006-01-09'
10, 10, '2006-01-10'
11, 11, '2006-01-11'
12, 12, '2006-01-12'
xxx
244, 1, '2006-09-01'
until 365
the output should like simular to this:
September 2006
Mon Tue Wed Thu Fri Sat Sun
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
<<Prev month Next Month>>
I really tryed and looked at some date/time functions however all of them is to create calendar withouth
setted dates directly out of a database ::)
I really hope someone can help me out as i'm already strugling with it over a week and i cant go on and sleep anymore.
It wont take long and i start crying as a girl
I'm working on a project to use database info as a calendar
for example :
Table calendar
calendar_id int(11) No 0 (for all yearday)
did int(11) Nee 0 (for calandarday)
calendar_date date No 0000-00-00 (full date)
1, 1, '2006-01-01'
2, 2, '2006-01-02'
3, 3, '2006-01-03'
4, 4, '2006-01-04'
5, 5, '2006-01-05'
6, 6, '2006-01-06'
7, 7, '2006-01-07'
8, 8, '2006-01-08'
9, 9, '2006-01-09'
10, 10, '2006-01-10'
11, 11, '2006-01-11'
12, 12, '2006-01-12'
xxx
244, 1, '2006-09-01'
until 365
the output should like simular to this:
September 2006
Mon Tue Wed Thu Fri Sat Sun
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
<<Prev month Next Month>>
I really tryed and looked at some date/time functions however all of them is to create calendar withouth
setted dates directly out of a database ::)
I really hope someone can help me out as i'm already strugling with it over a week and i cant go on and sleep anymore.
It wont take long and i start crying as a girl