It appears the class constants only cover PDO::PARAM_BOOL
, PDO::PARAM_INT
and PDO::PARAM_STR
for binding. Do you just bind decimal / float / double values as strings or is there a better way to treat them?
MySQLi allows the 'd' type for double, it's surprising that PDO doesn't have an equivalent when it seems better in so many other ways.
AFAIK PDO::PARAM_STR is the way to go.
You have to use PDO::PARAM_STR, but for SQLite and other engines this can have unpredictable behaviors. See this issue for one example: SQLite HAVING comparison error
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With