> -----Original Message-----
> From: Jason Pruim [mailto:[EMAIL PROTECTED]
> Subject: [PHP] Math problems (No not high school math!)
> 
> So I'm trying to figure out how to do a little math in php to add up
> the number of hours that people have worked (Still on the timecard for
> anyone following along at home)

Something like this should work:
Select SUM(timediff(`timeout`, `timein`)) where date = X;
And for a week:
Select SUM(timediff(`timeout`, `timein`)) where week(date) = week_of_year ;

(Not tested)


Simcha Younger




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to