I’m making a timesheet submit/approve function and currently working on the pending.php page, which the manager/admin can go to pending.php and view the pending timesheets for review…
my code now is:
list($qh,$num) = dbQuery(
"SELECT start_time, end_time, uid, submitid, submitstatus, submitdate, submitapprover
FROM $TIMES_TABLE
WHERE submitstatus=1
ORDER BY submitid");
right now it shows all the timesheet entries for that week:
example
what I really need is just one line for each week submitted. Basically, grabbing the first start_time and the last end_time and making it together (start – end)
(start_time – end_time | username | id | submitdate | submit status..etc)
Someone told me to use group_catcon or something but I’m unfamiliar with that.
From my pic I would want something like:
2012-12-30 - 2013-01-05 | admin | submitid#### | submitdate | status | approver
2013-01-06 - 2013-01-09 | admin | submitid#### | submitdate | status | approver
I’m pretty new to php/mysql so my apologies
You may find with all these columns it divides things up more than you want. For example of there’s various approvers. To that end you may want to remove some from the query.