   Mysql/PHP Sort
  I almost feel like my IQ is dropping a point or two just by asking....  but I'm trying to pull data from a mysql database useing php, and the code looks something like this.$r = mysql_query("select * from table order by cost asc");The problem is, when I try to display the values of $r,it doesn't really sort by cost....   it only looks at the first number, and sorts by that instead of sorting by the entire thing.  For example, the sort order will look something like:1000023003500004500This, to me, is absurd.  Is there any way to get it to actually sort by value?  Or is this just a mysql bug?  Or am I just overlooking something easy?  Thanks in advance.   
  What is the column definition for 'cost'?   ;  Looks like your cost field is a string type instead of a numerical type.   ;  Its int(11) not null   ;  How are you outputting the results of the query?   ;  well, i have:$r = mysql_query("select * from table order by cost asc");I then do:for($i=0; $row = mysql_fetch_array($r); $i++){echo $row['cost'].'</b/r>';}(slashes were added for obvious reasons)and it gives me what I posted earlier.  I really find it quite strange.   ;  Never mind... I've figured it out.... I had a syntax problem.  But thanks for the help : )   