Ok, as some of you may have read in a former post, I'm trying to set up next/back buttons based on database queries. If there IS another entry, I get a next, if there IS a former entry, I get a back. Well, I fixed that problem, unefficently, but fixed. What I'm having problems with now is moving around a null entry.
Say there are autoassigned IDs of 1, 2, 4, 5, 6, 8, 10. How do I move around 3, 7, and 9? I have an idea, but I'm not sure how to do it. I think would solve a lot of problems in the long run too.
What I want to do is re-align the database IDs on each INSERT, DELETE, or UPDATE so that the first entry in the database will ALWAYS be id #1 and all the following records would be in line, with no missed ID numbers. So, instead of:
1-2-4-5-6-8-10 you would have
1-2-3-4-5-6-7
Ideas?