# Weird Ranking question

**URL:** <https://forum.kirupa.com/t/weird-ranking-question/312991>\
**Category:** programming\
**Created:** [August 17, 2010, 7:46pm UTC](https://forum.kirupa.com/t/weird-ranking-question/312991 "2010-08-17T19:46:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Defigo](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Defigo](https://forum.kirupa.com/u/Defigo)\
**Post date:** [August 17, 2010, 7:46pm UTC](https://forum.kirupa.com/t/weird-ranking-question/312991/1 "2010-08-17T19:46:51Z")

</div>

I teach debate at my school and i was wanting to create a way of posting team scores from each match.

The part I am having trouble at is the rank. What i want to do is to rank each set of points ( FOO & BAR ). Then use the rank from each set ( Foo rank & Bar Rank ) as a score for that teams set then tally them up for a final score for that match. Then each match will be added up for a final score.

```auto

TEAM FOO Foo Rank BAR Bar Rank Total
------+-----+---------+----+--------+------
 You 2 1 5 2 3
 Me 6 3 3 1 4
 Them 4 2 7 3 5

```

I have mySQL set up for each match as:

```auto

 Match ID | Team 1 | Team 2 | Team 3| FOO 1 | FOO 2| FOO 3| FOO Rank 1 | FOO Rank 2 | FOO Rank 3 | 
----------+--------+--------+-------+-------+------+------+------------+------------+------------+
      1 | You | Me | Them | 2 | 6 | 4 | | | |
----------+--------+--------+-------+-------+------+------+------------+------------+------------+

```

I was wondering is it possible for me to take the points from FOO scores (1-3), rank them then record there rank in the corresponding slot (Foo Rank 1-3)? If so how? If not what is a better way?
