my query:
SELECT * from $usertable ORDER BY username DESC LIMIT 0,5
some names i put into the db to test:
adam
beth
carl
dennis
eric
frank
gretchen
if i run this query, i get:
carl
dennis
eric
frank
gretchen
instead of what i think it should be:
gretchen
frank
eric
dennis
carl.
sorting it by ASC instead produces:
eric
dennis
carl
beth
adam
when i should think it would produce:
adam
beth
carl
dennis
eric
removing the LIMIT argument instantly fixes the problem and things sort in the direction i'd expect. i've never had a problem with this statement in the years i've done wamp/lamp development, so i'm more than a bit confused
this is using php5.1. now using mysql 4.1, but the same behavior was happening in 3.23 for this query.