Jump to content

[SOLVED] mysql id column isnt ordered correctly.


yjim

Recommended Posts

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)) {

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.