smproph Posted December 5, 2010 Share Posted December 5, 2010 I have some fields with values such as [Men's 1, Men's 2.....] They are saved as VARCHAR and when I sort it is putting Men's 10 after Men's 1. I need it to go after Men's 9. What would be the best solution to fix this? Link to comment https://forums.phpfreaks.com/topic/220711-mysql-sort-problem/ Share on other sites More sharing options...
dreamwest Posted December 5, 2010 Share Posted December 5, 2010 change "1" to "01" Link to comment https://forums.phpfreaks.com/topic/220711-mysql-sort-problem/#findComment-1143155 Share on other sites More sharing options...
fenway Posted December 5, 2010 Share Posted December 5, 2010 Or add a "sortorder" column. Link to comment https://forums.phpfreaks.com/topic/220711-mysql-sort-problem/#findComment-1143307 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.