Row calculation problem
Posted: Mon Mar 24, 2008 1:54 am
Hey guys, you were so helpful with my last issue (which I'm very greatful for) I'm back to share another growing pain, and the last for now at least.
my row is looking like this:
network | user_amt | war_one | war_two | war_three | war_four | war_five
sample ----- 50 ------- 70 -------- 5 --------- 8 -------- 3 -------- 9
the war_one - five fields are just counters for the users selections but I need to calculate the highest value from the last five war fields (e.g 70) and divide it by the total value of the war fields (e.g 95) then times by 100 to return a percentage along with the highest fields name.
I have similar set ups in the database where the same returns are needed but their universal and can be column calculated where as this table is network specific so proving to be a bit difficult (for my learner level php)
Any help would be as always greatly appreciated ,
Jason
my row is looking like this:
network | user_amt | war_one | war_two | war_three | war_four | war_five
sample ----- 50 ------- 70 -------- 5 --------- 8 -------- 3 -------- 9
the war_one - five fields are just counters for the users selections but I need to calculate the highest value from the last five war fields (e.g 70) and divide it by the total value of the war fields (e.g 95) then times by 100 to return a percentage along with the highest fields name.
I have similar set ups in the database where the same returns are needed but their universal and can be column calculated where as this table is network specific so proving to be a bit difficult (for my learner level php)
Any help would be as always greatly appreciated ,
Jason