Zend Framework Error:Invalid parameter number: no parameters were bound'
        Posted  
        
            by 
                roast_soul
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by roast_soul
        
        
        
        Published on 2013-10-26T15:46:43Z
        Indexed on 
            2013/10/26
            15:53 UTC
        
        
        Read the original article
        Hit count: 344
        
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?
© Stack Overflow or respective owner