try the good ol' SETTYPE function to set the variable type from string to
numeric and visa versa...

Terry Romine wrote:

> I've run into a sticky case where my query is failing (PHP4.x/MySQL).
> I have a table where the price value is imported from an external
> source, so I can't change it on the fly, and they embed thousands
> seperators (in my case ','). When I try to do a query such as ".. where
> price <= '250000' .." if finds values that meet or exceed that value
> (returns some in the range of 2,500,000. I gather that it is failing
> because of the comma (the price field contains values of '2,500,000').
> Is there a function that I can use to force the price format to integer
> before/during the query? Or would it work if I did a number_format on
> the test value? ie: '.. where price <= '200,000' ..'
> Help would be appreciated.
> Terry
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

Leo G. Divinagracia III

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to