Welcome Guest, Not a member yet? Register   Sign In
How to apply MySQLi options to database for numeric data type
#1

I'm trying to get correct data type of numeric results from database (all return as strings).

I'm using MySQLi and the Connection Class (CodeIgniter\Database\MySQLi\Connection) doesn't seems to set up the option MYSQLI_OPT_INT_AND_FLOAT_NATIVE and doesn't have a way to do that from config/Database.

I've thinking to extend the Connection class, but the Option (i think) have to be set before mysqli real_connect is called (then, i have to rewrite all the function connect). On despite of that, i've try to extend Connection class without success. Any idea of how to achive this?

Of course, another solution would be to implement an entity for each data model, but i'm trying to get crude data to the frontend without this overhead.

There is a simple way to set up this configuration?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB