Handling ties when ranking from the highest to the lowest
        Posted  
        
            by Undgerman
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Undgerman
        
        
        
        Published on 2010-05-30T14:43:03Z
        Indexed on 
            2010/05/30
            14:52 UTC
        
        
        Read the original article
        Hit count: 199
        
php
I am trying to make a ranking manager for a small project.The totals are stored in the database.I can easily get the max and min using mysql and also arrange the records descending.The problem comes in when there is a tie.I need to show a tie in the form:1,2,3,3,4,5,6,7,7,7,7, etc.The repeated numbers will show the ties.I have been thinking of ways of achieving the above but i need more ideas;mine is seems long and complicated.
Can anybody share his/her idea of doing the ties.
© Stack Overflow or respective owner