Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upNumeric/Decimal type return as float #257
Open
Comments
|
Why should it return decimal as a string? |
|
Because these types are generally used for storing money, and we never use floats for money. Php does not have a built-in money format, so the only way out is a string. At first example with PDO you can see the right way. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: v3.0.5
Bug Description
Numeric/Decimal type return as
floatinsteadstringSteps To Reproduce
after run php code we got
Expected Behavior
Possible Solution
I think
floatmust return only if db field type isfloatordouble