# Rank calculation

Page 1 of 1

## 1 Replies - 2658 Views - Last Post: 21 June 2013 - 11:01 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=323405&amp;s=2e1a28722c63c9e91b05a7e6c40a5448&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

### #1 mutmalar

Reputation: 0
• Posts: 9
• Joined: 17-June 13

# Rank calculation

Posted 21 June 2013 - 09:28 PM

I have a database "student.mdb" having table "rank" with fields 1.regno(I) 2.Name© 3. Maths(I) 4.Physics(I) 5. Chemistry(I) 6. Total (I) 7. rank(I). I want put the rank in the rank field based on the Total field. suppose the student have secured same Total marks then i will give the first priority for highest mark secured in maths then Physics then Chemistry.

How to put the rank?
Is This A Good Question/Topic? 0

## Replies To: Rank calculation

### #2 vks.gautam1

• D.I.C Regular

Reputation: 17
• Posts: 317
• Joined: 21-March 08

## Re: Rank calculation

Posted 21 June 2013 - 11:01 PM

it is better to use sql statement.
```select * from table order by total, maths,physics,chemstiry

```

it's better you study sql to understand more about this. in this result will be displayed by total marks and after that scored marks in maths, phyiscs and so on.
http://www.w3schools...sql_orderby.asp