Search the Community
Showing results for tags 'reorder'.
I am working on a blog for a friend's website. Upon testing the database which holds her blog posts (for security issues and whatnot), and dropping random rows from it, I have noticed that the id field does not re-organize itself. The way I will be displaying her posts (5 per page, with previous and next buttons) depends on the id being in order and with no gaps. Is there any way I can put in a script using PHP or MySQL to organize these in case of a row being removed once the blog goes live? Also, I have noticed that I can put in one entry, drop it, and then when I test another one the id starts back at 2. The only way to get it to start at 1 again that I have seen is going into PHPmyAdmin and emptying the table. Thanks,Mark