consecutive rows
Posted: Sun Mar 26, 2006 4:10 pm
i have many of rows in a table.. all of them have a number identifyer thats auto incremented. Im trying to make a script that each time the script is called it selects one row then pulls the info from it.. then the next time its called, it pulls the next row and moves on down the list in order. So it'll rotate through each of the rows in the table. The problem is that the id number isnt consecutive because some rows have been removed. I created a table that the script will store the last row accessed and then the next time its called it can move on. Whats the best way to add 1 to the last row called.. check to see if it exsists, if not add 1 more to that number check to see if its there.. if so call the information and move on with the rest of the script?