/** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function free() { if (is_null($this->positions)) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $result = MDB2_OK; if (!is_null($this->statement)) { $connection = $this->db->getConnection(); if (PEAR::isError($connection)) { return $connection; } $query = 'DEALLOCATE PREPARE ' . $this->statement; $result = $this->db->_doQuery($query, true, $connection); } parent::free(); return $result; }
/** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function free() { if (is_null($this->positions)) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $result = MDB2_OK; if (!is_null($this->statement) && !@OCIFreeStatement($this->statement)) { $result = $this->db->raiseError(null, null, null, 'Could not free statement', __FUNCTION__); } parent::free(); return $result; }
/** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function free() { if (null === $this->positions) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $result = MDB2_OK; if (is_object($this->statement)) { if (!@mysqli_stmt_close($this->statement)) { $result = $this->db->raiseError(null, null, null, 'Could not free statement', __FUNCTION__); } } elseif (null !== $this->statement) { $connection = $this->db->getConnection(); if (PEAR::isError($connection)) { return $connection; } $query = 'DEALLOCATE PREPARE ' . $this->statement; $result = $this->db->_doQuery($query, true, $connection); } parent::free(); return $result; }
/** * Release resources allocated for the specified prepared query. * * @return mixed MDB2_OK on success, a MDB2 error on failure * @access public */ function free() { if (null === $this->positions) { return $this->db->raiseError(MDB2_ERROR, null, null, 'Prepared statement has already been freed', __FUNCTION__); } $result = MDB2_OK; if (null !== $this->statement && !@ibase_free_query($this->statement)) { $result = $this->db->raiseError(null, null, null, 'Could not free statement', __FUNCTION__); } parent::free(); return $result; }