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
You could use type casting once you've pulled the data from your MySQL database
$row['field'] = (int)$row['field'];