DATE_SUB Issues

From: Date: Mon, 29 Mar 2004 14:11:47 +0000
Subject: DATE_SUB Issues
Groups: php.db 
Request: Send a blank email to php-db+get-33684@lists.php.net to get a copy of this message
Hi There, Perhaps someone could lend me a hand here on this query. I have a query where I would like it to SUM up the last 7 days of records further, It needs to start a new week on Monday. The 'time_upload' field is a datetime field. What am I doing wrong or not doing here ? SELECT SUM(distance), DATE_FORMAT('time_upload', '%u'), WEEK('time_upload', '7') FROM TRAININGLOG WHERE DATE_SUB(NOW(),INTERVAL 7 DAY ) < =time_upload Thanks, Craig H. __________________________________ Craig Hoffman - eClimb Media v: (847) 644 - 8914 f: (847) 866 - 1946 e: choffman@eclimb.net w: www.eclimb.net _________________________________

« previous php.db (#33684) next »