mysql and mysqli functions always return strings values, and I understand that I can set the type of the data via the settype function AFTER I extract the data, but is there a way with PHP to extract the data as it is specified in the mysql database? (i.e if the type is an integer then PHP will insert the integer value in the result set).
The reason I ask is I want to create a function to verify the integrity of the database before I process it and if I can skip creating a function using regex to check if the value is an integer I would go that route.
Any help is appreciated
The reason I ask is I want to create a function to verify the integrity of the database before I process it and if I can skip creating a function using regex to check if the value is an integer I would go that route.
Any help is appreciated
Comment