If you want to bind a double to a statement, the accepted approach is to
bind as a string:
http://stackoverflow.com/questions/2718628/pdoparam-for-type-decimal

However, this means that prepared statements see these values as strings.
This can cause issues, for example:
http://stackoverflow.com/questions/38105900/sqlite-having-comparison-error

pdo_mysql will actually watch for doubles, but this code will never be
reached since all doubles are cast to strings:
https://github.com/php/php-src/blob/3f25c4228a8f505a000c1ea5751062606247349a/ext/pdo_mysql/mysql_statement.c#L563

Is there a reason PDO::PARAM_DOUBLE doesn't exist?

Thanks,
Adam

Reply via email to