Jump to content

[SOLVED] Sum points in multiple tables


Shazbot!

Recommended Posts

I receive a list of events through out the year. The events have an associated point value.

Participants attend the events and receive points.

Every semester participants can use the points to purchase items that are on auction.

 

I would like to create a query that will calculate the total points for each participant - the points spent.

 

 

table1 which contains event information, including points.

 

table 2 contains the attendance of participants along with the program IDs.

 

table 3 contains the points used and personal info.

 

I can sum table 1 and table 2 to get the total points participants have earned but now I need to subtract that number by table 3 points used.

 

I am having difficulty creating the second portion. Any advice is greatly appreciated.

 

I can do this in PHP but want to create a stored procedure.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/41851-solved-sum-points-in-multiple-tables/
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.