The problem is that 'value' could be a street address, for example,
numbers. So, when I do the :order if they are strings the get order
wonderfully, but in one case I have values that are numbers, for
example, 234, 233, 219, 25, 199, which get order as 199, 25, 219, 233,
234. Which is not what I want. I would like to order as 25, 199, 219,
233, 234.
Is there a way to get the order to order properly regardless if it is a
number of string? Thanks,
The problem is that 'value' could be a street address, for example,
numbers. So, when I do the :order if they are strings the get order
wonderfully, but in one case I have values that are numbers, for
example, 234, 233, 219, 25, 199, which get order as 199, 25, 219, 233,
234. Which is not what I want. I would like to order as 25, 199, 219,
233, 234.
Is there a way to get the order to order properly regardless if it is a
number of string? Thanks,
Google for "natural sort" for your particular database.