RE: [PHP] Math problems (No not high school math!)

From: Date: Thu, 25 Sep 2008 16:50:20 +0000
Subject: RE: [PHP] Math problems (No not high school math!)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-280928@lists.php.net to get a copy of this message
> -----Original Message----- > From: Jason Pruim [mailto:japruim@raoset.com] > 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

« previous php.general (#280928) next »