Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AE - Cannot insert double with precision and scale (38, 38) #706

Closed
lilgreenbird opened this issue Mar 6, 2018 · 1 comment
Closed

AE - Cannot insert double with precision and scale (38, 38) #706

lilgreenbird opened this issue Mar 6, 2018 · 1 comment

Comments

@lilgreenbird
Copy link
Contributor

When inserting a double (even for small double such as 0.1) into a column of type decimal(38, 38), the data inserted is 0.
Note that the data has to be inserted as double (i.e., no casting from double to string, no use of PDO::PARAM_STR when binding parameter)

for example, do something like this
$res = $stmt->bindParam(2, $val, PDO::PARAM_INT);

otherwise, the double value will be automatically casted to a string

New test covering this scenario: pdo_ae_insert_pdoparam_decimal_precision.phpt

@yitam
Copy link
Contributor

yitam commented Apr 10, 2018

Tested with ODBC 17.1 and verified that this had been fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants