Jump to content

[SOLVED] order by price not exactly right


aebstract

Recommended Posts

So in my search feature, I have an "Order by" part, where the user can choose how they want their results to display. One of the options is to order the results by price, which it does.. though the prices will list as such:

 

199.89

230.45

256.99

26.55

289.65

3.56

345.88

 

So it's going down in order, somewhat. It's just I need it to order by it's actual value, 3.56 should be at the top. My query looks like this:

 

$result2 = mysql_query("SELECT * FROM parts WHERE $searchfor LIKE '%$partsearch%' ORDER BY $orderby") or DIE(mysql_error());

 

Hopefully there is an easy workaround for this.

Thanks

Link to comment
https://forums.phpfreaks.com/topic/101577-solved-order-by-price-not-exactly-right/
Share on other sites

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.