I'm taking data out of a table that's like:
name | value
Jim 4
Dave 6
Pete 9
And I want to display percentages. Currently, I have to loop round the data, adding up the values and putting the row into another array/hash, and then once I've got the value, loop around the new array, outputting each record with it's percentage.
Is there an easier way to do this? (Note: I'm not selecting ALL records, I may only select the first 50, so it must be able to work with that too).
Regards,
Danny Tuppeny