The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

I Can Not get the Output to show $MARGIN_PERMAP in the correct order best to worst..I can change the $sortby to kills and it will output correctly so that kinda tells me the Calculation Im making in this cant do the Fuction twice??

by looking at the above info I supplied can you understand what Im trying to do...here is a Link of the output and notice how the LAST COLUMN doesnt sortby best to worst score..ADMIN should be listed in 1st place with 18.17

My Code may be CRUDE but I am TOTAL Newbie..actually just finished reading my 1st book...lol...but I love learning from everyone...any help would be appreciated...i think i know what problems are..just dont know how to fix it

also, when you're using string literals (that is, if there are no escaped characters and no variables within the string), use single quotes... it will increase performance...

Regarding the actual question you need help with, I can't really tell what's going on there. Perhaps it would help if you showed us how the database is constructed, and maybe a few lines of sample data.