Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Not an Issue
-
Affects Version/s: 0.9.2
-
Fix Version/s: None
-
Component/s: Zend_Db
-
Labels:None
Description
class Users extends Zend_Db_Table_Abstract { protected $_name = 'users'; } $db = Zend_Db::factory('PDO_MYSQL', $options); Zend_Db_Table_Abstract::setDefaultAdapter($db); $username = "chr?i's"; $table = new Users(); $where = $table->getAdapter()->quoteInto('username = ?',$username); $rows = $table->fetchAll($where);
results in an exception:
Fatal error: Uncaught exception 'Zend_Db_Adapter_Exception' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound'
When using "chr?is" or "chr'is" for $username everything is fine. It doesn't matter where the ? and ' are in the $username variable, just when they are both in $username they are causing problems.
Zend_Db related - assigned to Bill