mac007 Posted May 31, 2009 Share Posted May 31, 2009 HELLO, ALL: I am trying to filter items by "size", and it doesnt seem to be doing it just right, since it does numerically put them in order, but it runs sizes by including some of these like so: 1, 10, 12, 13, 14, 15, 2, 3, 4, 5, 6, 7.. and so on... so it's echoing the the 10-15 numbers out of order; i suppose cause it's reading them as starting with number 1, so it's a not really seeing them as numbers but as text?? how can I make it so they are numerically in order...? Appreciate any help... Link to comment https://forums.phpfreaks.com/topic/160387-how-come-when-filtering-items-by-size-it-shows-1-then-12-or-13-not-2-3-4/ Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 Cast them as integer values. What are you using to filter them? Link to comment https://forums.phpfreaks.com/topic/160387-how-come-when-filtering-items-by-size-it-shows-1-then-12-or-13-not-2-3-4/#findComment-846375 Share on other sites More sharing options...
mac007 Posted May 31, 2009 Author Share Posted May 31, 2009 Ahhh.. thanks Ken, right... I just realized my DB field was setup as "varchar" in order to allow non-numeric size such as "L", "M" and "S"... darn... I guess there is no way around that then, ha??? Link to comment https://forums.phpfreaks.com/topic/160387-how-come-when-filtering-items-by-size-it-shows-1-then-12-or-13-not-2-3-4/#findComment-846381 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.