Zend Framework Error:Invalid parameter number: no parameters were bound'
- by roast_soul
I'm using the Zend Frameworker 1.12.
According to the help file, I used the Zend_Db_Statement to execute my sql.
Below is my php code:
$sql = "delete from options where id=?";
$stmt = new Zend_Db_Statement_Mysqli($this->getAdapter(), $sql);
return $stmt->execute(array('1'));
But the error is exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: no parameters were bound' in D:\Zend\workspaces\DefaultWorkspace.metadata.plugins\org.zend.php.framework.resource\resources\ZendFramework-1\library\Zend\Db\Statement\Mysqli.php:209
Stack trace:
.........
.........
I googled for days, but nothing works.
Any one know how to fix it?