I'm using PDO and MySQL, for some reason when getting values from the database that are int type, the PDOStatement is returning a string representation of the number and not a value of numeric type. How do I prevent this from happening?
I noticed there is a attribute of the PDO class: PDO::ATTR_STRINGIFY_FETCHES
that is supposed to take care of this but, when trying to modify it, it throws an error saying the attribute is not valid for MySQL driver.
Is it normal to get strings instead of numbers when consulting a database?