Jump to content

Sum Of MYSQL Values from Different Tables


qadir5000

Recommended Posts

Hi All,

I'm learning PHP still as a beginner and my company has tasked me with creating a program to calculate daily sales by shift.

 

I have two tables:

 

attendance

id

date

time 

brand

branch

shift

 

attendanceout

id

date

time

brand

branch

sales

 

So when employees come in they put attendance in which goes to attendance table and when they go out their entry goes into attendanceout with the their sales of the day.

 

What I want is, data to come like this:

 

Date - Shift - Total Sales

10/02/2014 - Morning - 2000

10/02/2014 - Closing - 1000

11/02/2014 - Morning - 3000

11/02/2014 - Closing - 1500

 

 

I hope I have managed to explain it.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.