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? Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/252771-problem-with-order-by/#findComment-1295878 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.