I have a decimal field set to 50,2 in my table. The problem is this field can hold numbers without decimals, for example:
20.20
30.59
5
14
35.70
In my PHP code, i check to see if it has a decimal, and that's how I know that it's money, so I add number_format() to the value. My problem is when I'm sorting the field, it puts 5 before 14. I'm guessing because the 5 is greater than the 1.
Whats the solution to this situation?
_______________
_brian.
20.20
30.59
5
14
35.70
In my PHP code, i check to see if it has a decimal, and that's how I know that it's money, so I add number_format() to the value. My problem is when I'm sorting the field, it puts 5 before 14. I'm guessing because the 5 is greater than the 1.
Whats the solution to this situation?
_______________
_brian.