I am not sure if there is a function within mysql query. I have a price table, and the column name is "price" and its type is VARCHAR(). I intentionally needed it as VARCHAR for many reason.
Now the problem is if I want to search products for maximum price of e.g. 100000, but in my column we have different types of prices, example below:-
- TBD 374,500
- Negotiation
- 299,000
I am looking for a function like intVal() which will first convert the field value itself to INTEGER and compare it. Below is my current statement in query:-
... AND price <= $maximum_price
may be something like this should be the solution : intVal(price) <= $maximum_price
any help or direction towards solutions is appreciated. cheers