How to get integer columns as actual integer with PHP/PDO/MySQL
tl;dr: It is not the job of a database system (SQLite, MySQL, …) to cast queried data into each column’s type. A database will return data as string, even for integer columns. So if your query returns you any other type than string, then it is typically tanks to the database…