November 27, 201213 yr I have a page with a big list of stuff. I used a script to enter them all because it would have been a pain to enter everything in HTML with copy & paste. (it’s a lot of DIVs etc and information that has to be changed in-between, so it’s not just a „list“ like I said actually). Anyway, this script used auto_increment. Now I’m not sure why but the last entry of this so-called list (which was the first entry I entered) doesn’t appear on the page anymore. It does appear in the „control panel“ however that I used to enter the data. I can even edit it and submit again but it just won’t appear. I tried going to MySQL and swapping IDs and indeed it does work then, so something seems to be stuck with ID #1 for some reason. I removed auto-increment and hoped I could arrange all stuff the way I wanted but ID #1 is still „blocked“ somehow. Any ideas what this could be? It would be a pain to add everything again.
November 27, 201213 yr It's hard to tell without any code , but aren't you maybe using a loop to print out all the data, which dosen't start on 0 ? Just a guess, Léon
November 28, 201213 yr Author I figured it out! Didn't have anything to do with MySQL, but with the PHP code. I had this here to retrieve the data from the DB: mysql_query('SELECT * FROM site_vehicles ORDER BY id DESC LIMIT 0, 66'); I had tried the alter table thing already that's why I was wondering why it didn't work. The "66" was set to 65 by mistake. Which would only allow 65 entries, therefore one missing Thanks!
Create an account or sign in to comment