Getting selected rows to auto increment in MySQL
Posted: Thu Nov 20, 2003 10:31 pm
Hi,
This sounds a little complicated, but.... I hope you can help me
What I want to do is to write a piece of code that will enable me to select a group of rows from the database and numerically auto increment only the selected rows.
I want to do this because I am building a search function into my application that has to search a particular group of userids and display them in a page format (like 100 per display page), and the number of the display page is dependant upon the userid of the user logged onto the application, and in order to make the function that does this more efficient it would help if I could know the exact row number of that user in the group of selected userids (so that I could set up a LIMIT in my mysql query based upon that row number)
Thanks ahead of time
This sounds a little complicated, but.... I hope you can help me
What I want to do is to write a piece of code that will enable me to select a group of rows from the database and numerically auto increment only the selected rows.
I want to do this because I am building a search function into my application that has to search a particular group of userids and display them in a page format (like 100 per display page), and the number of the display page is dependant upon the userid of the user logged onto the application, and in order to make the function that does this more efficient it would help if I could know the exact row number of that user in the group of selected userids (so that I could set up a LIMIT in my mysql query based upon that row number)
Thanks ahead of time