# MySQL - Get position of sorted rows?

**URL:** <https://forum.kirupa.com/t/mysql-get-position-of-sorted-rows/227723>\
**Category:** programming\
**Created:** [June 1, 2007, 2:55pm UTC](https://forum.kirupa.com/t/mysql-get-position-of-sorted-rows/227723 "2007-06-01T14:55:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![duncanhall](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@duncanhall](https://forum.kirupa.com/u/duncanhall)\
**Post date:** [June 1, 2007, 2:55pm UTC](https://forum.kirupa.com/t/mysql-get-position-of-sorted-rows/227723/1 "2007-06-01T14:55:41Z")

</div>

I have a table which stores high-scores, along with player ids. I want to be able to extract a record by a players id, and then get the rank, or position of their score in the table.

“SELECT \* FROM `high_scores` ORDER BY `game_score` DESC”;

Will give me the results ordered by score, highest to lowest, but how can I then get a record from it and determine where in the table this score is placed?
