In Progress

Sort and add times from MySQL table

I have a PHP/MYSQL based system that tracks employee times.

I need the PHP code that will access this database and sort and add the times each employee has worked over a selected 15 day period (July 1-15, July 16-31)

Majority of employees clock in/out 4 times a day (in for the morning, out for lunch, in after lunch, and out at the end of the day).

My database has two tables, the employee table and times table, attached is a photo of the times table, each table shares a common variable of the eid (the employee number). The Employee table has the first and last names of the employees.

The times table has the following fields:

pid - punch ID - auto-increasing, unique to every punch.

pstatus - Punch status: 0 = punching out, 1 = punching in

time - the date and time of the punch in timestamp format (0000-00-00 00:00:00)

eid - employee ID, identifies the employee

Ideally the output would look something like:


John Doe


In 8:00am

Out 12:00pm

In 1:00pm

Out 5:00pm Total: 8.0 hours


In 8:00am

Out 12:00pm

In 1:00pm

Out 5:00pm Total: 8.0 hours


Week Total: 16.0 hours

Skills: MySQL, PHP

See more: mysql add times, sort sort sort, sort sort, 8 tracks, timestamp, punching, punch, add number, employee hours access database, mysql add fields, mysql sort, employee mysql, date mysql sort, auto add, something common, last names, mysql output table, variable mysql, add access, mysql based system, employee system php, php mysql time clock, access lunch database, add code access database, employee time database

About the Employer:
( 10 reviews ) Austin, United States

Project ID: #1129318

Awarded to:


NetXpertIndia is a customer-specific service oriented company has got a Professional and creative team. We are the Professional Web Development Company having rich experience in Web design and development. Our team can More

$30 USD in 0 days
(86 Reviews)

8 freelancers are bidding on average $53 for this job


checked , i can sort out that for you.

$50 USD in 1 day
(326 Reviews)

please see pm

$30 USD in 0 days
(91 Reviews)

I'm SENIOR developer in PHP/MYsql. I will build a report for you on web or can export to excel file if you need. Please contact

$50 USD in 1 day
(74 Reviews)


$100 USD in 2 days
(64 Reviews)

Hi, PHP, MySql Expert Here! Let's start! Check PMB!

$40 USD in 3 days
(14 Reviews)

Hello I can help you with your request, please check my PM. I check your database and I have 2 possible ways to do your work.

$100 USD in 1 day
(23 Reviews)

Hello, please see pm.

$90 USD in 2 days
(7 Reviews)

Please check your Inbox. Thanks.

$30 USD in 1 day
(0 Reviews)