Jump to content

Calculating the sum of table fields


erikjan

Recommended Posts

Can someone please help me. Thank you very much in advance!

I have a database with sold items. One of the many fields in
a table for each sold item is shipping costs, another one the amount of that product sold.

Imagine at a particular moment there are 80 rows inserted: client 1, client 2 etc. Each of them
has bought a certain amount of product A and/or B.

What I would like to do is to calculate the total sum of product A sold in one month, plus the
total amount of all shipping costs.

Can someone please help me, how to do this after I have made the SQL query?


Link to comment
https://forums.phpfreaks.com/topic/34248-calculating-the-sum-of-table-fields/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.