dotkpay Posted December 8, 2011 Share Posted December 8, 2011 Hello, Am trying to get my records in ascending order from the database using 'ORDER BY' but they come randomly. What might be the problem? Link to comment https://forums.phpfreaks.com/topic/252771-problem-with-order-by/ Share on other sites More sharing options...
SergeiSS Posted December 8, 2011 Share Posted December 8, 2011 First of all - show you code (query). Otherwise it's impossible to say anything. Link to comment https://forums.phpfreaks.com/topic/252771-problem-with-order-by/#findComment-1295863 Share on other sites More sharing options...
ManiacDan Posted December 8, 2011 Share Posted December 8, 2011 You might be trying to sort strings as though they were numbers. If you're getting: 1 10 11 2 20 21 Then you've set up your table wrong, those are numbers, not strings. -Dan Link to comment https://forums.phpfreaks.com/topic/252771-problem-with-order-by/#findComment-1295878 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.