When data is returned from MySQL, it is automatically returned as strings, regardless of the MySQL data type.
Is there any way to tell MySQL/PHP to maintain the data
If you are running Ubuntu:
sudo apt-get remove php5-mysql sudo apt-get install php5-mysqlnd sudo service apache2 restart