php - PDO::PARAM for type decimal? -
i have 2 database fields
`decval` decimal(5,2) `intval` int(3)
i have 2 pdo queries update them. 1 updates int works ok
$update_intval->bindparam(':intval', $intval, pdo::param_int);
but can't update decimal field. i've tried 3 ways below, nothing works
$update_decval->bindparam(':decval', $decval, pdo::param_str); $update_decval->bindparam(':decval', $decval, pdo::param_int); $update_decval->bindparam(':decval', $decval);
it seems problem database type decimal
? there pdo::param
field of type decimal
? if not, use workaround?
there isn't pdo::param
decimals / floats, you'll have use pdo::param_str
.
Comments
Post a Comment