php - How to find the rank of a particular row value? -
this question has answer here:
- getting rank of row in mysql query 1 answer
i have table name 'points' shown below,
name | point abc 10 cde 5 efg 15
how find rank of particular name?
for example: rank 3 cde in above case
a simple way (though requires knowing how many points name has) count rows above it
select count(*) rank tbl points > '%d'
Comments
Post a Comment