Answer the question
In order to leave comments, you need to log in
How can I separately display the place that an article occupies, for example?
How to separately display the space that an article occupies for example in phpmyadmin?
What I did ..
I displayed a list of articles by sql rating with a query from higher to lower, for example
, 1st place article rating 10
2nd place article rating 9
3rd place article rating 8
4th place article rating 7
and I did it all in the table and numbered and so I find out which place it occupies but the numbering is not recorded anywhere.
I want the article itself to say that this article takes, for example, 3rd place in the ranking, but that this is all done automatically.
I think I explained everything clearly, please help)
Answer the question
In order to leave comments, you need to log in
You need a nested query:
SELECT
x.позиция
FROM ('Тот запрос, который выдает вам эту таблицу') x
WHERE x.статья = ID;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question