Hello peeps,
I am working on a new menu system to make navigation of the members commission statements easier.It currently just shows a long list.
I have the basic menu structure done but am strugling to think of the best way to store the data to then loop and build the dynamic menu.
I have decided after speaking with the accounts bods that the menu will show the months as a static menu January - December regardless if they have a statement for that month, then a sub menu will pop out for the years 2005, 2006 etc... with a further sub menu for each statement .
so we have for example
what is the best way to store this data and then loop it.
I have an array of hashes for each of the statements (a record set).
I need to build them into Month/Year.
Can I have a hash of arrays of arrays ? would that be the right approach. so i have a hash for the month, each value is an array for each year and each year is an array for each statement.
should I have an array for each month separately, which holds an array of the years which holds an array of each statement?
How would you approach this?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
I am working on a new menu system to make navigation of the members commission statements easier.It currently just shows a long list.
I have the basic menu structure done but am strugling to think of the best way to store the data to then loop and build the dynamic menu.
I have decided after speaking with the accounts bods that the menu will show the months as a static menu January - December regardless if they have a statement for that month, then a sub menu will pop out for the years 2005, 2006 etc... with a further sub menu for each statement .
so we have for example
and so on....January
|
----2005
| |
| ------ Period Ending 10/01/2005
| |
| ------ Period Ending 27/01/2005
|
----2006
| |
| ------ Period Ending 01/01/2006
February
|
----2005
what is the best way to store this data and then loop it.
I have an array of hashes for each of the statements (a record set).
I need to build them into Month/Year.
Can I have a hash of arrays of arrays ? would that be the right approach. so i have a hash for the month, each value is an array for each year and each year is an array for each statement.
should I have an array for each month separately, which holds an array of the years which holds an array of each statement?
How would you approach this?
"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.