I have 2 products, one is a thousand dollars so for it's price I inserted into the database:
1000.00
and nother thats 34 dollars so I inserted:
34.00
But when I sort the products in order by price (low to high) the $1,000 product comes before the $34 one, why?
The query:
SELECT * FROM products ORDER BY price ASC;
EDIT
It's a varchar field. I would have used int but I need the decimal to be accepted.
If I turn it to int, is there any way I can convert something like this:
10000
to a more user friendly form when display to the user like:
$10,000
I am using PHP for scripting by the way.