List of Dates Grouped by Week
| From: | Shaun | Date: | Tue, 26 Oct 2004 13:25:45 +0000 |
| Subject: | List of Dates Grouped by Week | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-200345@lists.php.net to get a copy of this message | ||
Hi,
I am creating an online timesheet application. Most parts are done, however
I have a problem displaying a list of unapproved timesheets.
Here is my timesheet table:
mysql> DESCRIBE Timesheets;
+-------------------+-------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default | Extra
|
+-------------------+-------------+------+-----+------------+----------------+
| Timesheet_ID | int(11) | | PRI | NULL | auto_increment
|
| Type | varchar(40) | YES | | NULL |
|
| Project_ID | int(11) | YES | | NULL |
|
| User_ID | int(11) | | | 0 |
|
| Hours | float | | | 0 |
|
| Date | date | | | 0000-00-00 |
|
| Status | varchar(40) | YES | | Open |
|
+-------------------+-------------+------+-----+------------+----------------+
When a timesheet is submitted for approval the manager logs in and approves
/ rejects the timesheets. How can I display a list of unapproved timesheets
grouped by week and user? i.e.
Week 1 - Bill - 45 Hours
Week 1 - Fred - 40 Hours
Week 2 - Bill - 45 Hours
Week 2 - Fred - 40 Hours
Week 2 - Sam - 12 Hours
Thanks for your help.