hii guys...
Please help me on this issue ..
This is my query...
$qry="SELECT id,WorkID,GROUP_CONCAT(Recordtime) as times,Recorddate FROM attendance_logs GROUP BY WorkID ORDER BY id ";
$output=mysql_query($qry,$conn);
while($employee_details=mysql_fetch_assoc($output) )
{
$details[]=$employee_details;
}
output looks like this..
Array
(
[0] => Array
(
[id] => 2
[WorkID] => 849
[times] => 09:39:16,09:32:00,09:29:45,09:24:07
[Recorddate] => 2012-01-21
)
[1] => Array
(
[id] => 5
[WorkID] => 845
[times] => 09:09:43
[Recorddate] => 2012-01-02
)
[2] => Array
(
[id] => 6
[WorkID] => 844
[times] => 09:49:17
[Recorddate] => 2012-01-02
)
[3] => Array
(
[id] => 11
[WorkID] => 109
[times] => 09:42:49,14:13:00,09:43:40,09:12:37,09:58:53,09:42 :17
[Recorddate] => 2012-01-02
)
I want to calculate times( from times key, daily punches of an employee) of every employee inside office and outside office like ...
(first + second) punch times == inside office
(second + third) punch times = outside office
i want these calculations to show on report page...
I hope you guys understand....Pleease help me how to do these calcualtions in php... !!
Thanks in advance .
Kiran
