Array Help - Trying To Get Clarification
Posted: Sun Dec 20, 2009 12:41 am
It's possible my previous posts haven't been very clear on what my real problem is so I'm going to try again. This problem is very vexing to me and it's important that I get it solved.
I am pulling data from a query. We'll say I have 3 fields: nperi, apr, balance. Let's also say I have 3 rows.
I need to specifically refer to nperi for the 3rd row. So far I have not found a good way to do this. My query will have a variable number of rows, so how do I get to element 1 of row x (where x is the last row)?
All help is greatly appreciated. This problems is driving me nuts. Thanks!
nperi | apr | balance
10 .07 200000
15 .06 15000
20 .05 5000
I just now realized that I could (since my array is sorted by nperi) create another query in descending order, limit it to 1 record and then get the last nperi that way, but there must be a better way to do it than that.
Thanks!
I am pulling data from a query. We'll say I have 3 fields: nperi, apr, balance. Let's also say I have 3 rows.
I need to specifically refer to nperi for the 3rd row. So far I have not found a good way to do this. My query will have a variable number of rows, so how do I get to element 1 of row x (where x is the last row)?
All help is greatly appreciated. This problems is driving me nuts. Thanks!
nperi | apr | balance
10 .07 200000
15 .06 15000
20 .05 5000
I just now realized that I could (since my array is sorted by nperi) create another query in descending order, limit it to 1 record and then get the last nperi that way, but there must be a better way to do it than that.
Thanks!