I have a local MySQL environment on an Ubuntu instance, and a live MariaDB environment running on a Centos 7 instance. When selecting an integer field from a table using PHP, this value should return as an integer, however, MariaDB returns this value as a string.
Both environments are running the same instance of code using Laravel Eloquent ORM, and I have checked each respective database is storing the value as integers/tiny-ints etc.
The code used is:
MariaDB, Centos 7:
This is weird behaviour to me, and on the programming end, is causing errors when evaluating the expected integers in "if" expressions.
Is there some configuration option that can force MariaDB to return the integer values as integer types?