Issue Type: Bug Created: 2012-03-28T07:44:17.000+0000 Last Updated: 2012-03-28T07:44:17.000+0000 Status: Open Fix version(s): Reporter: Jean-Marie Lamodière (jmlamo) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db
Related issues: Attachments:
Some locales convert floats to string with a comma instead of a dot, as fr_FR. (string)12.34 == "12,34".
Zend_Db_Adapter_Abstract::_quote() handle this by using sprintf('%F', $value) when is_float($value) line 843. Float is converted to string with a dot regardless of the locale used.
But Zend_Db_Adapter_Pdo_Abstract::_quote() does not, line 292. This leads to a bug. For instance, with $db instanceof Zend_Db_Adapter_Pdo_Mysql :
echo (string) $db->select()->from('foo')->where('bar = ?', 12.34); //"SELECT
foo WHERE (bar = 12,34)"
Mysql error : "#1064 - You have an error in your SQL syntax;..."
I think ..._Pdo_Abstract::_quote() should do the same as ..._Abstact::_quote() ?
No comments to display
Have you found an issue?
See the Overview section for more details.