public function prepare($sql)
    {
        $this->_connect();
        if ($this->_stmt) {
            $this->_stmt->close();
        }
        $stmtClass = $this->_defaultStmtClass;
        if (!class_exists($stmtClass)) {
            // require_once 'Zend/Loader.php';
            Zend_Loader::loadClass($stmtClass);
        }
        $stmt = new $stmtClass($this, $sql);
        if ($stmt === false) {
            return false;
        }
        $stmt->setFetchMode($this->_fetchMode);
        $this->_stmt = $stmt;
        return $stmt;
    }
public function prepare($sql)
    {
        $this->_connect();
        if ($this->_stmt) {
            $this->_stmt->close();
        }
        $stmtClass = $this->_defaultStmtClass;
        if (!class_exists($stmtClass)) {
            // require_once 'Zend/Loader.php';
            Zend_Loader::loadClass($stmtClass);
        }
        $stmt = new $stmtClass($this, $sql);
        if ($stmt === false) {
            return false;
        }
        $stmt->setFetchMode($this->_fetchMode);
        $this->_stmt = $stmt;
        return $stmt;
    }
public function prepare ( $ sql ) { $ this -> _connect ( ) ; if ( $ this -> _stmt ) { $ this -> _stmt -> close ( ) ; } $ stmtClass = $ this -> _defaultStmtClass ; if ( ! class_exists ( $ stmtClass ) ) { // require_once 'Zend/Loader.php'; Zend_Loader :: loadClass ( $ stmtClass ) ; } $ stmt = new $ stmtClass ( $ this , $ sql ) ; if ( $ stmt === false ) { return false ; } $ stmt -> setFetchMode ( $ this -> _fetchMode ) ; $ this -> _stmt = $ stmt ; return $ stmt ; }
Prepare a statement and return a PDOStatement-like object.

@param  string  $sql  SQL query
@return Zend_Db_Statement_Mysqli
Prepare a statement and return a PDOStatement - like object .