PDO query result error

WBOY
Release: 2016-08-18 09:16:19
Original
994 people have browsed it

The result of querying the

sql statement in the database is 0.11, but after connecting to the database through PDO, the result becomes .11, with a 0 missing in front, but 1.11 can be displayed normally. Yes, I don’t know what caused it. Looking for a solution~Thank you very much

Reply content:

The result of querying the

sql statement in the database is 0.11, but after connecting to the database through PDO, the result becomes .11, with a 0 missing in front, but 1.11 can be displayed normally. Yes, I don’t know what caused it. Looking for a solution~Thank you very much

0.11 is the same as .11
can be recognized by PHP when reading

If you are really worried, just echo (float).11;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!