essjay_d12 Posted June 4, 2007 Share Posted June 4, 2007 When I try to order by ID it prints as the following 1 1 1 10 10 11 2 3 where as i want it going ..... 1 1 1 2 3 10 11 is there a way in which the sql statement can change this rather than editing the database (assuming the problme is because they dont have a zero in front of them!!) cheers d PS I have no access to the db......!!! (extracting information through asp) Link to comment https://forums.phpfreaks.com/topic/54115-solved-order-by-not-running-quite-right/ Share on other sites More sharing options...
Wildbug Posted June 4, 2007 Share Posted June 4, 2007 That column is being interpreted as a string. You should be able to force MySQL to interpret those values as numbers by using "...ORDER BY id+0" Link to comment https://forums.phpfreaks.com/topic/54115-solved-order-by-not-running-quite-right/#findComment-267737 Share on other sites More sharing options...
essjay_d12 Posted June 5, 2007 Author Share Posted June 5, 2007 nice one, thats got it working, cheers Link to comment https://forums.phpfreaks.com/topic/54115-solved-order-by-not-running-quite-right/#findComment-268340 Share on other sites More sharing options...
fenway Posted June 6, 2007 Share Posted June 6, 2007 Why would be it a string? Link to comment https://forums.phpfreaks.com/topic/54115-solved-order-by-not-running-quite-right/#findComment-269117 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.