Vivid Lust Posted February 19, 2009 Share Posted February 19, 2009 Hi all, Its probably me! (in fact, it is me, computers don't usually lie) But the sql doesn't seem to be working right. Picture: http://sixpop.com/images/101912748.jpg I'm trying to select 4 records ordered by the amount of views ascending. However looking at the results, the views columns numbers aren't in any order... Thanks for any help. Link to comment https://forums.phpfreaks.com/topic/145911-solved-sql-not-working/ Share on other sites More sharing options...
haku Posted February 19, 2009 Share Posted February 19, 2009 You have to turn the views column into an integer type. You have it as varchar, or text. So it's in the correct order for a varchar or text field - the first characters are ordered ascending. Link to comment https://forums.phpfreaks.com/topic/145911-solved-sql-not-working/#findComment-766053 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.