本文整理汇总了PHP中OCIFreeCursor函数的典型用法代码示例。如果您正苦于以下问题:PHP OCIFreeCursor函数的具体用法?PHP OCIFreeCursor怎么用?PHP OCIFreeCursor使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OCIFreeCursor函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _close
function _close()
{
if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false;
if (!empty($this->_refcursor)) {
OCIFreeCursor($this->_refcursor);
$this->_refcursor = false;
}
@OCIFreeStatement($this->_queryID);
$this->_queryID = false;
}
示例2: free
/**
* Free the internal resources associated with $result.
*
* @return boolean true on success, false if $result is invalid
* @access public
*/
function free()
{
if (is_resource($this->result) && $this->db->connection) {
$free = @OCIFreeCursor($this->result);
if ($free === false) {
return $this->db->raiseError(null, null, null, 'Could not free result', __FUNCTION__);
}
}
$this->result = false;
return MDB2_OK;
}
示例3: registro_db
/**
* @name registro_db
* @param string cadena_sql
* @param int numero
* @return boolean
* @access public
*/
function registro_db($cadena_sql, $numero)
{
unset($this->registro);
if (!is_resource($this->enlace)) {
return FALSE;
}
//echo "Ejemplo: ".$cadena_sql."<br>";
$cadenaParser = OCIParse($this->enlace, $cadena_sql);
$busqueda = OCIExecute($cadenaParser);
if ($busqueda) {
$j = 0;
while (OCIFetchInto($cadenaParser, $row, OCI_RETURN_NULLS)) {
$a = 0;
$un_campo = 0;
$campos = count($row);
while ($a < $campos) {
$this->registro[$j][$un_campo] = $row[$a++];
$un_campo++;
}
$j++;
//$this->registro[$j][$un_campo] = $salida[$j][$un_campo];
//echo $this->registro[$j][$un_campo];
}
$this->conteo = $j--;
//echo $this->conteo;
@OCIFreeCursor($cadenaParser);
return $this->conteo;
} else {
unset($this->registro);
$this->error = oci_error();
//echo $this->error();
return 0;
}
}
示例4: freeResult
/**
* Free the internal resources associated with $result.
*
* @param $result result identifier
* @return bool TRUE on success, FALSE if $result is invalid
* @access public
*/
function freeResult($result)
{
$result_value = intval($result);
if (!isset($this->current_row[$result_value])) {
return $this->raiseError(MDB_ERROR, NULL, NULL, 'Free result: attemped to free an unknown query result');
}
if (isset($this->highest_fetched_row[$result_value])) {
unset($this->highest_fetched_row[$result_value]);
}
if (isset($this->row_buffer[$result_value])) {
unset($this->row_buffer[$result_value]);
}
if (isset($this->limits[$result_value])) {
unset($this->limits[$result_value]);
}
if (isset($this->current_row[$result_value])) {
unset($this->current_row[$result_value]);
}
if (isset($this->results[$result_value])) {
unset($this->results[$result_value]);
}
if (isset($this->columns[$result_value])) {
unset($this->columns[$result_value]);
}
if (isset($this->result_types[$result_value])) {
unset($this->result_types[$result_value]);
}
return @OCIFreeCursor($result);
}
示例5: free
/**
* Free the internal resources associated with $result.
*
* @return boolean true on success, false if $result is invalid
* @access public
*/
function free()
{
$free = @OCIFreeCursor($this->result);
if (!$free) {
if (is_null($this->result)) {
return MDB2_OK;
}
return $this->mdb->raiseError();
}
$this->result = null;
return MDB2_OK;
}
示例6: procesarResultado
private function procesarResultado($cadenaParser, $numeroRegistros)
{
unset($this->registro);
$busqueda = OCIExecute($cadenaParser);
if ($busqueda !== TRUE) {
$mensaje = "ERROR EN LA CADENA " . $cadena_sql;
error_log($mensaje);
}
if ($busqueda) {
// carga una a una las filas en $this->registro
while ($row = oci_fetch_array($cadenaParser, OCI_BOTH)) {
$this->registro[] = $row;
}
// si por lo menos una fila es cargada a $this->registro entonces cuenta
if (isset($this->registro)) {
$this->conteo = count($this->registro);
}
@OCIFreeCursor($cadenaParser);
// en caso de que existan cero (0) registros retorna falso ($this->conteo=false)
return $this->conteo;
} else {
$this->error = oci_error();
echo $this->error();
return 0;
}
}
示例7: FreeResult
function FreeResult($result)
{
$result_value = intval($result);
if (!isset($this->current_row[$result_value])) {
return $this->SetError("Free result", "attemped to free an unknown query result");
}
unset($this->highest_fetched_row[$result_value]);
unset($this->row_buffer[$result_value]);
unset($this->limits[$result_value]);
unset($this->current_row[$result_value]);
unset($this->results[$result_value]);
unset($this->columns[$result_value]);
unset($this->rows[$result_value]);
unset($this->result_types[$result]);
return OCIFreeCursor($result);
}
示例8: registro_db
/**
* @name registro_db
* @param string cadena_sql
* @param int numero
* @return boolean
* @access public
*/
function registro_db($cadena_sql, $numero)
{
unset($this->registro);
if (!is_resource($this->enlace)) {
return FALSE;
}
$cadenaParser = OCIParse($this->enlace, $cadena_sql);
if (isset($this->variable_sql)) {
OCIBindByName($cadenaParser, $this->variable_sql[0], $salidaSQL, $this->variable_sql[1]);
}
$busqueda = OCIExecute($cadenaParser);
$this->afectadas = oci_num_rows($cadenaParser);
if ($busqueda) {
$j = 0;
while (OCIFetchInto($cadenaParser, $row, OCI_RETURN_NULLS)) {
$a = 0;
$un_campo = 0;
$campos = count($row);
while ($a < $campos) {
$this->registro[$j][$un_campo] = $row[$a++];
$un_campo++;
}
$j++;
//$this->registro[$j][$un_campo] = $salida[$j][$un_campo];
}
if (isset($salidaSQL)) {
$this->registro[0][0] = $salidaSQL;
$j = 1;
unset($this->variable_sql);
}
$this->conteo = $j--;
@OCIFreeCursor($cadenaParser);
return $this->conteo;
} else {
unset($this->registro);
$this->error = oci_error();
return 0;
}
}