Why does Pdo convert all of our int type to string type?
Source: Internet
Author: User
Why does Pdo convert all of our int type to string type ??? What parameters do you want to set ?? What are the considerations for this design ??? There is nothing to do with the data type except false =. besides, false = should be written false =. in this way, the data type is really related, why does mysql data Pdo convert all our int type to string type ???
What parameters do you want to set ??
What are the considerations for this design ??? A little pitfall
------ Solution --------------------
Except false =, there is nothing related to the data type.
Besides, false = writing is false =, so that it is actually related to the type.
------ Solution --------------------
The query results returned from the mysql database are all text and processed as strings, because PHP does not know your table structure. Both mysqli and pdo are like this!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.