I'm trying sort all the users in the database by a value and give them a new ID, that will act as their position.
I've tried to order them descending by money
, that's the value I'm looking for to order by, but I wasn't able to properly update each user's ID in order.
Please note, the database has over 5000 entries, so I need a way that won't lag out the database.