php - How do I find out the index in a MySQL table -


I am programming in PHP5; MySQL5 and I would like to know how to remove an entry pointer. To be clear, here's an example: I have 500 users in the table, I want to select user johndo and the indicator of that user, so if johando is the 100th user in my table, then I will select the notification I want to be able to:

  SELECT *, INDEX_OF (id) from user where user name = 'johndoe';  

Then I will get details about the user (name, username, id, index etc ...) Please note this is different from user ID.

> You can use the _rowid special column, but it is just like "unsigned integer auto_quality primary key", meaning that you will usually say "id".

The order of the SQL is not required, the lines searched , only on the returned rows, this means that you can not go to the 100th position for every search on that entry. So in that sense, any attempt to find the physical position of the line can return a different result every time.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -