5 months ago

Ranks/Levels to users

Posted 5 months ago by AlexJ123


I have in database stored how much each users has bought items. I want to add to user dashboard which rank he is, in other words I want variable which will sort table in database who bought most items and give people that rank.

Let's say:

Alex bought 10 items total Elliot bought 12 items total John bought 15 items total

John would gets rank 1. Elliot would gets rank 2. Alex would gets rank 3. etc..

Any idea how to make it?

Please sign in or create an account to participate in this conversation.