Jump to content

Trouble sorting numbers in a mysql database *Resolved*


DarkHorizon

Recommended Posts

I have a database containing products, each has a price.

i want to be able to sort the database by price, high to low or low to high.


$query = "SELECT * FROM $table order by price asc LIMIT $limitvalue, $limit";

$limitvalue and $limit are pagination variables which work okay

the table gets sorted by price okay but i get:

1.50
17.00
19.50
2.00
22.00
234.00
3.19

you can see whats happening, wbut why? and how can i fix it display the correct ascending order.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.