PHP Class CI_DB_result, TastyIgniter

This is the platform-independent result class. This class will not be called directly. Rather, the adapter class for the specific database will extend and instantiate it.
Author: EllisLab Dev Team
Afficher le fichier Open project: tastyigniter/tastyigniter Class Usage Examples

Méthodes publiques

Свойство Type Description
$conn_id resource | object Connection ID
$current_row integer Current Row index
$custom_result_object object[] Custom Result Object
$num_rows integer Number of rows
$result_array array[] Result Array
$result_id resource | object Result ID
$result_object object[] Result Object
$row_data array Row data

Méthodes publiques

Méthode Description
__construct ( object &$driver_object ) : void Constructor
custom_result_object ( string $class_name ) : array Custom query result.
custom_row_object ( integer $n, string $type ) : object Returns a single result row - custom object version
data_seek ( integer $n ) : boolean Data Seek
field_data ( ) : array Field data
first_row ( string $type = 'object' ) : mixed Returns the "first" row
free_result ( ) : void Free the result
last_row ( string $type = 'object' ) : mixed Returns the "last" row
list_fields ( ) : array Fetch Field Names
next_row ( string $type = 'object' ) : mixed Returns the "next" row
num_fields ( ) : integer Number of fields in the result set
num_rows ( ) : integer Number of rows in the result set
previous_row ( string $type = 'object' ) : mixed Returns the "previous" row
result ( string $type = 'object' ) : array Query result. Acts as a wrapper function for the following functions.
result_array ( ) : array Query result. "array" version.
result_object ( ) : array Query result. "object" version.
row ( mixed $n, string $type = 'object' ) : mixed Row
row_array ( integer $n ) : array Returns a single result row - array version
row_object ( integer $n ) : object Returns a single result row - object version
set_row ( mixed $key, mixed $value = NULL ) : void Assigns an item into a particular column slot
unbuffered_row ( string $type = 'object' ) : mixed Returns an unbuffered row and move pointer to next row

Méthodes protégées

Méthode Description
_fetch_assoc ( ) : array Result - associative array
_fetch_object ( string $class_name = 'stdClass' ) : object Result - object

Method Details

__construct() public méthode

Constructor
public __construct ( object &$driver_object ) : void
$driver_object object
Résultat void

_fetch_assoc() protected méthode

Returns the result set as an array. Overridden by driver result classes.
protected _fetch_assoc ( ) : array
Résultat array

_fetch_object() protected méthode

Returns the result set as an object. Overridden by driver result classes.
protected _fetch_object ( string $class_name = 'stdClass' ) : object
$class_name string
Résultat object

custom_result_object() public méthode

Custom query result.
public custom_result_object ( string $class_name ) : array
$class_name string
Résultat array

custom_row_object() public méthode

Returns a single result row - custom object version
public custom_row_object ( integer $n, string $type ) : object
$n integer
$type string
Résultat object

data_seek() public méthode

Moves the internal pointer to the desired offset. We call this internally before fetching results to make sure the result set starts at zero. Overridden by driver result classes.
public data_seek ( integer $n ) : boolean
$n integer
Résultat boolean

field_data() public méthode

Generates an array of objects containing field meta-data. Overridden by driver result classes.
public field_data ( ) : array
Résultat array

first_row() public méthode

Returns the "first" row
public first_row ( string $type = 'object' ) : mixed
$type string
Résultat mixed

free_result() public méthode

Overridden by driver result classes.
public free_result ( ) : void
Résultat void

last_row() public méthode

Returns the "last" row
public last_row ( string $type = 'object' ) : mixed
$type string
Résultat mixed

list_fields() public méthode

Generates an array of column names. Overridden by driver result classes.
public list_fields ( ) : array
Résultat array

next_row() public méthode

Returns the "next" row
public next_row ( string $type = 'object' ) : mixed
$type string
Résultat mixed

num_fields() public méthode

Overridden by driver result classes.
public num_fields ( ) : integer
Résultat integer

num_rows() public méthode

Number of rows in the result set
public num_rows ( ) : integer
Résultat integer

previous_row() public méthode

Returns the "previous" row
public previous_row ( string $type = 'object' ) : mixed
$type string
Résultat mixed

result() public méthode

Query result. Acts as a wrapper function for the following functions.
public result ( string $type = 'object' ) : array
$type string 'object', 'array' or a custom class name
Résultat array

result_array() public méthode

Query result. "array" version.
public result_array ( ) : array
Résultat array

result_object() public méthode

Query result. "object" version.
public result_object ( ) : array
Résultat array

row() public méthode

A wrapper method.
public row ( mixed $n, string $type = 'object' ) : mixed
$n mixed
$type string 'object' or 'array'
Résultat mixed

row_array() public méthode

Returns a single result row - array version
public row_array ( integer $n ) : array
$n integer
Résultat array

row_object() public méthode

Returns a single result row - object version
public row_object ( integer $n ) : object
$n integer
Résultat object

set_row() public méthode

Assigns an item into a particular column slot
public set_row ( mixed $key, mixed $value = NULL ) : void
$key mixed
$value mixed
Résultat void

unbuffered_row() public méthode

Returns an unbuffered row and move pointer to next row
public unbuffered_row ( string $type = 'object' ) : mixed
$type string 'array', 'object' or a custom class name
Résultat mixed

Property Details

$conn_id public_oe property

Connection ID
public resource|object $conn_id
Résultat resource | object

$current_row public_oe property

Current Row index
public int $current_row
Résultat integer

$custom_result_object public_oe property

Custom Result Object
public object[] $custom_result_object
Résultat object[]

$num_rows public_oe property

Number of rows
public int $num_rows
Résultat integer

$result_array public_oe property

Result Array
public array[] $result_array
Résultat array[]

$result_id public_oe property

Result ID
public resource|object $result_id
Résultat resource | object

$result_object public_oe property

Result Object
public object[] $result_object
Résultat object[]

$row_data public_oe property

Row data
public array $row_data
Résultat array