ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Public Member Functions | |
__construct (&$db, &$result, $limit=0, $offset=0) | |
Constructor. More... | |
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... | |
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 |
|||
) |
Constructor.
Definition at line 3363 of file MDB2.php.
References $db, $limit, $offset, and $result.
Referenced by MDB2_Result_Common().
MDB2_Result_Common::_assignBindColumns | ( | $row | ) |
Bind a variable to a value in the result row.
array | row data |
@access private
Definition at line 3786 of file MDB2.php.
Referenced by MDB2_Result_mysql\fetchRow(), MDB2_Result_mysqli\fetchRow(), MDB2_Result_oci8\fetchRow(), MDB2_BufferedResult_oci8\fetchRow(), and MDB2_Result_pgsql\fetchRow().
MDB2_Result_Common::_getColumnNames | ( | ) |
Retrieve the names of columns returned by the DBMS in a query result.
@access private
Reimplemented in MDB2_Result_mysql, MDB2_Result_mysqli, MDB2_Result_oci8, and MDB2_Result_pgsql.
Definition at line 3702 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 |
@access public
Definition at line 3754 of file MDB2.php.
References MDB2_OK, and MDB2_PORTABILITY_FIX_CASE.
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. |
@access public
Definition at line 3550 of file MDB2.php.
References $row, fetchRow(), PEAR\isError(), MDB2_ERROR_TRUNCATED, and MDB2_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 |
@access public
Definition at line 3504 of file MDB2.php.
References $row, fetchRow(), PEAR\isError(), MDB2_ERROR_TRUNCATED, MDB2_FETCHMODE_ASSOC, and MDB2_FETCHMODE_ORDERED.
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 |
@access public
Definition at line 3478 of file MDB2.php.
References $row, $rownum, fetchRow(), 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 |
@access public
Reimplemented in MDB2_Result_mysql, MDB2_Result_mysqli, MDB2_Result_oci8, MDB2_BufferedResult_oci8, and MDB2_Result_pgsql.
Definition at line 3458 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
Referenced by fetchAll(), fetchCol(), fetchOne(), and seek().
MDB2_Result_Common::free | ( | ) |
Free the internal resources associated with result.
@access public
Reimplemented in MDB2_Result_mysql, MDB2_Result_mysqli, MDB2_Result_oci8, MDB2_BufferedResult_oci8, and MDB2_Result_pgsql.
Definition at line 3807 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. |
@access public
Definition at line 3674 of file MDB2.php.
References $result, and PEAR\isError().
Referenced by MDB2_BufferedResult_oci8\fetchRow().
MDB2_Result_Common::getResource | ( | ) |
MDB2_Result_Common::MDB2_Result_Common | ( | & | $db, |
& | $result, | ||
$limit = 0 , |
|||
$offset = 0 |
|||
) |
PHP 4 Constructor.
Definition at line 3377 of file MDB2.php.
References $limit, $offset, $result, and __construct().
MDB2_Result_Common::nextResult | ( | ) |
Move the internal result pointer to the next available result.
@access public
Reimplemented in MDB2_Result_mysqli, MDB2_BufferedResult_mysqli, and MDB2_Result_pgsql.
Definition at line 3652 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.
@access public
Reimplemented in MDB2_Result_mysql, MDB2_Result_mysqli, MDB2_Result_oci8, and MDB2_Result_pgsql.
Definition at line 3719 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::numRows | ( | ) |
Returns the number of rows in a result object.
@access public
Reimplemented in MDB2_BufferedResult_mysql, MDB2_BufferedResult_mysqli, MDB2_BufferedResult_oci8, and MDB2_BufferedResult_pgsql.
Definition at line 3636 of file MDB2.php.
References MDB2_ERROR_UNSUPPORTED.
MDB2_Result_Common::rowCount | ( | ) |
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 |
@access public
Reimplemented in MDB2_BufferedResult_mysql, MDB2_BufferedResult_mysqli, MDB2_BufferedResult_oci8, and MDB2_BufferedResult_pgsql.
Definition at line 3432 of file MDB2.php.
References $rownum, fetchRow(), MDB2_ERROR_UNSUPPORTED, and MDB2_OK.
Referenced by MDB2_Result_mysql\fetchRow(), MDB2_Result_mysqli\fetchRow(), MDB2_Result_oci8\fetchRow(), and MDB2_Result_pgsql\fetchRow().
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. |
@access public
Definition at line 3406 of file MDB2.php.
References $types, PEAR\isError(), and MDB2_OK.
MDB2_Result_Common::$column_names |
Definition at line 3355 of file MDB2.php.
Referenced by MDB2_BufferedResult_oci8\fetchRow().
MDB2_Result_Common::$db |
Definition at line 3347 of file MDB2.php.
Referenced by __construct().
MDB2_Result_Common::$limit |
Definition at line 3354 of file MDB2.php.
Referenced by __construct(), and MDB2_Result_Common().
MDB2_Result_Common::$offset |
Definition at line 3352 of file MDB2.php.
Referenced by __construct(), and MDB2_Result_Common().
MDB2_Result_Common::$result |
Definition at line 3348 of file MDB2.php.
Referenced by __construct(), and MDB2_Result_Common().
MDB2_Result_Common::$rownum = -1 |
Definition at line 3349 of file MDB2.php.
Referenced by MDB2_BufferedResult_oci8\_fillBuffer(), fetchOne(), MDB2_Result_mysql\fetchRow(), MDB2_Result_mysqli\fetchRow(), MDB2_Result_oci8\fetchRow(), MDB2_BufferedResult_oci8\fetchRow(), MDB2_Result_pgsql\fetchRow(), seek(), MDB2_BufferedResult_mysql\seek(), MDB2_BufferedResult_mysqli\seek(), MDB2_BufferedResult_oci8\seek(), and MDB2_BufferedResult_pgsql\seek().
MDB2_Result_Common::$types = array() |
Definition at line 3350 of file MDB2.php.
Referenced by setResultTypes().