示例#1
0
 /**
  * Prepare a statement and return a PDOStatement-like object.
  *
  * @param  string  $sql  SQL query
  * @return Zend_Db_Statement_Mysqli
  */
 public function prepare($sql)
 {
     $this->_connect();
     $stmt = new Zend_Db_Statement_Mysqli($this, $sql);
     $stmt->setFetchMode($this->_fetchMode);
     return $stmt;
 }
示例#2
0
 /**
  * Prepare a statement and return a PDOStatement-like object.
  *
  * @param  string  $sql  SQL query
  * @return Zend_Db_Statement_Mysqli
  */
 public function prepare($sql)
 {
     $this->_connect();
     if ($this->_stmt) {
         $this->_stmt->close();
     }
     $stmt = new Zend_Db_Statement_Mysqli($this, $sql);
     if ($stmt === false) {
         return false;
     }
     $stmt->setFetchMode($this->_fetchMode);
     $this->_stmt = $stmt;
     return $stmt;
 }