You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: