Ideally your database column should be defined as the correct type like DECIMAL, NUMERIC, etc.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
ssand wrote:Well, it was originally. Then someone thought they needed it to support more than just numbers and decimals. For a "price" column?!? Really?
You seriously should consider eliminating or altering the data that does not conform to a decimal (2,4), fix your table structure, then write the correct query. What your doing is terribly inefficient.