If I were to have a MySQL database with a bunch of random things in it, each having a sequential 'id' field, and a field called 'active' with either a 1 or a 0, and i ran this query on it
"SELECT * FROM someDb WHERE active = '0' ORDER BY id ASC LIMIT 1"
would I always be returning the lowest id where active = 0? or is it dependent on the arbitrary ordering of the items in the database?
basically what I'm asking is will ORDER BY id ASC only order a results list or will it use the whole database?
MySQL result order
Moderator: General Moderators