Home >Backend Development >PHP Tutorial >PDO query result error

PDO query result error

WBOY
WBOYOriginal
2016-08-18 09:16:191059browse

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;

Statement:
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