jdlev has asked for the wisdom of the Perl Monks concerning the following question:
1) Pull player info out of DB by position, and insert information into an array at each position. @QB, @RB, @WR, etc... I'm not sure how to store the information from the DB in an array? I assume the best way to do this is to put all the DB info in an array and iterate through the arrays so the program doesn't do 50 Billion calls to the DB. I'm guessing each record would have to be saved as a multidimensional array, because you have your player ID, which could represent the first dimension, and then you have a key and a value based on the record? So, I guess what I'm saying is if I have the following info:
player_id: 1 player_name: Jeff player_salary: 5 What would that array look like to index it by it's id first, and then using the keys, player_name, set to value Jeff?
I can't figure out how to get the information from the database in a useable format WHILE keeping track of the important statistics. I don't just want max value, I want to know the variables that lead to the max value. TIA for any advice.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Multidimensional Array Iteration?
by Your Mother (Archbishop) on Aug 23, 2013 at 19:15 UTC | |
Re: Multidimensional Array Iteration?
by glenn (Scribe) on Aug 23, 2013 at 19:43 UTC | |
Re: Multidimensional Array Iteration?
by marinersk (Priest) on Aug 23, 2013 at 20:37 UTC |