MySQL Forums
Forum List  »  Newbie

sorting output - question about ORDER by
Posted by: Michael Camp
Date: July 15, 2005 09:31PM

I've got a data table named "admin" which stores real esate properties and I want it to pull waterfront properties, then display by price, sorted ASC

$sql="SELECT * FROM admin WHERE cat='waterfront' ORDER BY price ASC";

prices range from 99,000 to 1,575,000

but instead of recognizing 99,000 as lower than the one-million number, it shows the 1,575,000 first - obviously sorting by "1-9," regardless of the real number value.

Is there a better way to get it to sort numbers from smallest to largest?

thanks in advance, ya'all.
mc

Options: ReplyQuote


Subject
Written By
Posted
sorting output - question about ORDER by
July 15, 2005 09:31PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.