Jump to content

noob question about databases


elrobbo6

Recommended Posts

OK, so I have a question about databases and how they sort things being loaded into them. I have a database that I have images uploaded to (some people dont like to do it this way but this is what is going to work for my project).  I have it set up with an id column that auto-increments.  When I upload the files for some reason it is putting the highest id number first and the second one is the lowest then it goes in order from there.  Why would this be happening and how do I correct it?

Link to comment
https://forums.phpfreaks.com/topic/236719-noob-question-about-databases/
Share on other sites

How do you know it is putting one record before another? The only way to "see" the records in a database (that I know of) is to run a query and then display the results. The query will determine the sort order. If you don't provide one then I believe the implied sort order is the order in which the records are created. But, I would NEVER rely upon that. If you want your records in a particular order then order them using the query.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.