hy everybody!
think this is easy for you, but i cant get a solution!
i wrote a timetable for my work, the problem is: every work has a category id (f.a. pictures --> 2) for the category pictures i have to to 100 hours in one year.
so if i worked 2 hours for the category pictures it should summary the time worked for category 2.
then the 100 hours - the time worked for category 2
thats my requested result!
difficulties:
if i make a while() the result looks like this:
270 (the time 4:30)
480 (the time 8:00)
480 (the time 8:00)
but i want 270+480+480 = my requested result
(i calculate the time to minutes to get a result)
mysql-table:
##################################################ID categoryID datum von bis zeit taetigkeit
1 2 2003-03-20 14:00 18:30 4:30 blabla
2 2 2003-03-20 08:00 16:00 8:00 blabla
5 2 2003-08-20 08:00 16:00 8:00 blabla
##################################################
i already tried the sum() function, but that gives me only the hours back (20h).
can anybody help me?