yjim Posted August 11, 2009 Share Posted August 11, 2009 im trying to order my mysql table by a varchar column that contains integers and php spits it out like this: 1,10,11,12,13,14,2,20,21,21 .. instead of 1,2,3,4,5,6,7,8,9,10,11 etc.. any idea how to fix this? here is my code: $query = mysql_query("SELECT * FROM items ORDER by uid asc"); while ($data = mysql_fetch_assoc($query)) { Quote Link to comment Share on other sites More sharing options...
yjim Posted August 11, 2009 Author Share Posted August 11, 2009 nvmd this works: mysql_query("SELECT * FROM items ORDER by (uid+0) asc"); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.