Hey guys, I'm programming in PHP5 & MySQL5 and I'd like to know how to figure out the index of an entry. To be clear, here's an example: I have 500 users in a table, I want to select the user johndoe and the index of that user, so if johndoe is the 100th user in my table, I want to be able to select the information for him in a similar way to this:
SELECT *, INDEX_OF(id) FROM users WHERE username='johndoe';
So I'd get the details about the user back (name, username, id, index etc...) Please note this is different than the ID of the user.
Bunu nasıl yapıyor hakkında gitmek istiyorsunuz?
Teşekkür ederiz!