Answer the question
In order to leave comments, you need to log in
Get the position of a row in a selection?
There is a request for selection in a DB on a rating, let's say. I need to know the position of a string with a known id. It is possible by a bulkhead in php, but I'm interested in the method through the database itself.
Answer the question
In order to leave comments, you need to log in
Find the rating for that id, then count `COUNT(*) AS POSITION WHERE rating > MyRating` how many rows with a higher rating.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question