ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
|
Public Member Functions | |
__construct ($db, $result, $limit=0, $offset=0) | |
Constructor. More... | |
fetch ($fetch_mode=ilDBConstants::FETCHMODE_ASSOC) | |
fetchObject () | |
fetchAssoc () | |
MDB2_Result_Common ($db, $result, $limit=0, $offset=0) | |
PHP 4 Constructor. More... | |
setResultTypes ($types) | |
Define the list of types to be associated with the columns of a given result set. More... | |
seek ($rownum=0) | |
Seek to a specific row in a result set. More... | |
& | fetchRow ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rownum=null) |
Fetch and return a row of data. More... | |
fetchOne ($colnum=0, $rownum=null) | |
fetch single column from the next row from a result set More... | |
fetchCol ($colnum=0) | |
Fetch and return a column from the current row pointer position. More... | |
fetchAll ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rekey=false, $force_array=false, $group=false) | |
Fetch and return all rows from the current row pointer position. More... | |
rowCount () | |
Returns the actual row number that was last fetched (count from 0) More... | |
numRows () | |
Returns the number of rows in a result object. More... | |
nextResult () | |
Move the internal result pointer to the next available result. More... | |
getColumnNames ($flip=false) | |
Retrieve the names of columns returned by the DBMS in a query result or from the cache. More... | |
_getColumnNames () | |
Retrieve the names of columns returned by the DBMS in a query result. More... | |
numCols () | |
Count the number of columns returned by the DBMS in a query result. More... | |
getResource () | |
return the resource associated with the result object More... | |
bindColumn ($column, &$value, $type=null) | |
Set bind variable to a column. More... | |
_assignBindColumns ($row) | |
Bind a variable to a value in the result row. More... | |
free () | |
Free the internal resources associated with result. More... | |
execute ($a_data=null) | |
Public Member Functions inherited from ilDBStatement | |
fetchRow ($fetch_mode) | |
Data Fields | |
$db | |
$result | |
$rownum = -1 | |
$types = array() | |
$values = array() | |
$offset | |
$offset_count = 0 | |
$limit | |
$column_names | |
MDB2_Result_Common::__construct | ( | $db, | |
$result, | |||
$limit = 0 , |
|||
$offset = 0 |
|||
) |
MDB2_Result_Common::_assignBindColumns | ( | $row | ) |
Bind a variable to a value in the result row.
array | row data |
private
Definition at line 3806 of file MDB2.php.
References $column, $row, and MDB2_OK.
MDB2_Result_Common::_getColumnNames | ( | ) |
Retrieve the names of columns returned by the DBMS in a query result.
private
Definition at line 3722 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::bindColumn | ( | $column, | |
& | $value, | ||
$type = null |
|||
) |
Set bind variable to a column.
int | column number or name |
mixed | variable reference |
string | specifies the type of the field |
public
Definition at line 3774 of file MDB2.php.
References $column, MDB2_OK, and MDB2_PORTABILITY_FIX_CASE.
MDB2_Result_Common::execute | ( | $a_data = null | ) |
array | $a_data |
ilDatabaseException |
Implements ilDBStatement.
Definition at line 3839 of file MDB2.php.
References $res, and MDB2\isError().
MDB2_Result_Common::fetch | ( | $fetch_mode = ilDBConstants::FETCHMODE_ASSOC | ) |
int | $fetch_mode |
Implements ilDBStatement.
Definition at line 3377 of file MDB2.php.
MDB2_Result_Common::fetchAll | ( | $fetchmode = MDB2_FETCHMODE_DEFAULT , |
|
$rekey = false , |
|||
$force_array = false , |
|||
$group = false |
|||
) |
Fetch and return all rows from the current row pointer position.
int | $fetchmode | the fetch mode to use:
|
bool | if set to true, the $all will have the first column as its first dimension | |
bool | used only when the query returns exactly two columns. If true, the values of the returned array will be one-element arrays instead of scalars. | |
bool | if true, the values of the returned array is wrapped in another array. If the same key value (in the first column) repeats itself, the values will be appended to this array instead of overwriting the existing values. |
public
Definition at line 3570 of file MDB2.php.
References $row, array, PEAR\isError(), MDB2_ERROR_TRUNCATED, MDB2_FETCHMODE_ASSOC, and MDB2_FETCHMODE_FLIPPED.
MDB2_Result_Common::fetchAssoc | ( | ) |
Implements ilDBStatement.
Definition at line 3387 of file MDB2.php.
References ilDBConstants\FETCHMODE_ASSOC.
MDB2_Result_Common::fetchCol | ( | $colnum = 0 | ) |
Fetch and return a column from the current row pointer position.
int | the column number to fetch |
public
Definition at line 3524 of file MDB2.php.
References $column, $row, array, PEAR\isError(), MDB2_ERROR_TRUNCATED, MDB2_FETCHMODE_ASSOC, and MDB2_FETCHMODE_ORDERED.
MDB2_Result_Common::fetchObject | ( | ) |
Implements ilDBStatement.
Definition at line 3382 of file MDB2.php.
References ilDBConstants\FETCHMODE_OBJECT.
MDB2_Result_Common::fetchOne | ( | $colnum = 0 , |
|
$rownum = null |
|||
) |
fetch single column from the next row from a result set
int | the column number to fetch |
int | number of the row where the data can be found |
public
Definition at line 3498 of file MDB2.php.
References $row, PEAR\isError(), MDB2_ERROR_TRUNCATED, MDB2_FETCHMODE_ASSOC, and MDB2_FETCHMODE_ORDERED.
& MDB2_Result_Common::fetchRow | ( | $fetchmode = MDB2_FETCHMODE_DEFAULT , |
|
$rownum = null |
|||
) |
Fetch and return a row of data.
int | how the array data should be indexed |
int | number of the row where the data can be found |
public
Definition at line 3478 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::free | ( | ) |
Free the internal resources associated with result.
public
Definition at line 3827 of file MDB2.php.
References MDB2_OK.
MDB2_Result_Common::getColumnNames | ( | $flip = false | ) |
Retrieve the names of columns returned by the DBMS in a query result or from the cache.
bool | If set to true the values are the column names, otherwise the names of the columns are the keys. |
public
Definition at line 3694 of file MDB2.php.
References $result, and PEAR\isError().
MDB2_Result_Common::getResource | ( | ) |
MDB2_Result_Common::MDB2_Result_Common | ( | $db, | |
$result, | |||
$limit = 0 , |
|||
$offset = 0 |
|||
) |
PHP 4 Constructor.
Definition at line 3397 of file MDB2.php.
MDB2_Result_Common::nextResult | ( | ) |
Move the internal result pointer to the next available result.
public
Definition at line 3672 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::numCols | ( | ) |
Count the number of columns returned by the DBMS in a query result.
public
Definition at line 3739 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::numRows | ( | ) |
Returns the number of rows in a result object.
public
Implements ilDBStatement.
Definition at line 3656 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::rowCount | ( | ) |
Returns the actual row number that was last fetched (count from 0)
public
Implements ilDBStatement.
MDB2_Result_Common::seek | ( | $rownum = 0 | ) |
Seek to a specific row in a result set.
int | number of the row where the data can be found |
public
Definition at line 3452 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED, and MDB2_OK.
MDB2_Result_Common::setResultTypes | ( | $types | ) |
Define the list of types to be associated with the columns of a given result set.
This function may be called before invoking fetchRow(), fetchOne(), fetchCol() and fetchAll() so that the necessary data type conversions are performed on the data to be retrieved by them. If this function is not called, the type of all result set columns is assumed to be text, thus leading to not perform any conversions.
array | variable that lists the data types to be expected in the result set columns. If this array contains less types than the number of columns that are returned in the result set, the remaining columns are assumed to be of the type text. Currently, the types clob and blob are not fully supported. |
public
Definition at line 3426 of file MDB2.php.
References PEAR\isError(), and MDB2_OK.