Getting DB data as correct PHP types directly |
Hi. Is it possible to get data from database as correct PHP types directly without retyping them?
For example: TINYINT, INT, BIGINT as integer FLOAT, DOUBLE, DECIMAL as float CHAR, VARCHAR, TEXT as string I do not care about dates as date type. Now everything, except of null, are strings. I am using MySQL database.
Set numberNative to true:
https://github.com/codeigniter4/CodeIgni...se.php#L45 See numberNative in https://codeigniter.com/user_guide/datab...-of-values |
Welcome Guest, Not a member yet? Register Sign In |