I can\'t seem to figure out how to reset and resort an array from a mysql_fetch_array.
I do the following to get my array:
mysql_fetch_array($qry, MYSQL_ASSOC);
What I want to do is the following:
NAME / STAT1 / STAT2 / STAT3
Jamie / 123 / 456 / 789
Bob / 100 / 500 / 660
Frank / 200 / 426 / 580
I only want to query the db once, so no matter which way I \"order by\", I will still need to re-sort 2 different columns.
What I am trying to get is a numeric ranking for each stat category, and then email the results to each person...on an individual level...in this case it would be:
Jamie / #2 / #2 / #1 => Email
Bob / #3 / #1 / #2 => Email
Frank / #1 / #3 / #3 => Email
Only thing i can\'t figure out is how to resort the array. (and re-use it...reset() does not seem to work) ksort() seems to no work for things with multiple keys..maybe I am wrong, but I can\'t get it to work at all.
Thanks in advance,
Jamison.