Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 1.7.4
-
Fix Version/s: None
-
Component/s: Zend_Db
-
Labels:None
Description
This is the minimal test case:
$model = new Project();
$q = "test?'";
$rs = $model->fetchAll($model->select()->where('name=?',$q));
Raises "SQLSTATE[HY093]: Invalid parameter number: no parameters were bound"
Note that $q contains a ? AND a ' (single quote)
With a single "?" or a single "'" it works as expected.
Using PDO_MYSQL adapter PHP 5.2.6 (Ubuntu)
php_value magic_quotes_gpc "0"
php_value magic_quotes_runtime "0"
php_value magic_quotes_sybase "0"
UPDATE: with the MYSQLI adapter it works.
Issue Links
| This issue duplicates: | ||||
| ZF-1343 | "Invalid parameter number: no parameters were bound" when using ' and ? in where clause |
|
|
|
The Project model is simply something like that
Class Project extends Zend_Db_Table_Abstract {
}