treat mysql longtext as integer in query
- by InnateDev
I have a set field in my db that is longtext. I have used prices in this field and cannot change the field type to integer. In my query however I need to sort by these fields and assume I should treat them as an integer. is there another way to query these results to sort by price as an integer and not longtext without having to change the field type?
at the moment 3900000 is smaller than 4300 in my result set.