Adding Results from fields

3 posts by 3 authors in: Forums > CMS Builder
Last Post: February 16, 2015   (RSS)

By kitka - February 13, 2015

Is it possible to take the results of a sample table and have it add the results...

I wanted to calculate the total value  for data entered each week....

for instance... i'll use sport team for an example

WHAT I AM THINKING IS A SPORTS L;EAGUE WITH 10 MEMBERS...

EACH WILL HAVE THEIR OWN PAGE TO, LOGIN AND ENTER THEIR WEEKLY PICKS.

THESE PICKS WILL THEN BE TABULATED AND STANDINGS WILL BE KEPT....

USER 1   jim

week            team selected         wins        losses...   points     totlal Points

week 1        Dallas                       10            6            13

week 2         chicago                     6           10            34

USER 2   bill

week            team selected         wins        losses...   points     totlal Points

week 1        ney york                       10            6            13

week 2         cleveland                      6           10            34

. etc etc..... 

then i want to have the total ponts accumulated  (running toital)   and then ranked  AGAINST THE OTHER 9 USERS...  so create basically a standing page based on user input

Standings page....
tema name            wins            losses          pts

1.    Usr1 JIM.......... 16                  10            47 
2.   Usr 4 bill            12                   148         33 

etc etc

also is it possible to have selections greyed out (not avaiable) once thye have been used.

Any suggestions for the mysql syntax would be appreciated or if anybody has done anything like this any help would be appreciated...

OR ANY SUGGESTIONS WHICH WOULD BE THE MOST EFFECTIVE WAY TO SET THIS UP....

JIM

I want to do a running total of how many people  

jim albert

By claire - February 16, 2015

The easiest way to do it really depends on how much info you're pulling from the database at once.

If it's thousands of rows all at once, then you'll need to do some of the data aggregation in the query to cut down on the info being sent from the database. If it's only a couple of hundred, max, then it's easier to pull all those rows and use PHP to handle all of the aggregation.

I can give you some broad pointers on how to implement both approaches, but outside of that, I'd have to refer you to consulting@interactivetools.com. It sounds like a lot of custom work.

--------------------

Claire Ryan
interactivetools.com

Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/