ILIAS
eassessment Revision 61809
|
Public Member Functions | |
__construct (&$db, &$result, $limit=0, $offset=0) | |
Constructor. | |
MDB2_Result_Common (&$db, &$result, $limit=0, $offset=0) | |
PHP 4 Constructor. | |
setResultTypes ($types) | |
Define the list of types to be associated with the columns of a given result set. | |
seek ($rownum=0) | |
Seek to a specific row in a result set. | |
& | fetchRow ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rownum=null) |
Fetch and return a row of data. | |
fetchOne ($colnum=0, $rownum=null) | |
fetch single column from the next row from a result set | |
fetchCol ($colnum=0) | |
Fetch and return a column from the current row pointer position. | |
fetchAll ($fetchmode=MDB2_FETCHMODE_DEFAULT, $rekey=false, $force_array=false, $group=false) | |
Fetch and return all rows from the current row pointer position. | |
rowCount () | |
Returns the actual row number that was last fetched (count from 0) | |
numRows () | |
Returns the number of rows in a result object. | |
nextResult () | |
Move the internal result pointer to the next available result. | |
getColumnNames ($flip=false) | |
Retrieve the names of columns returned by the DBMS in a query result or from the cache. | |
_getColumnNames () | |
Retrieve the names of columns returned by the DBMS in a query result. | |
numCols () | |
Count the number of columns returned by the DBMS in a query result. | |
getResource () | |
return the resource associated with the result object | |
bindColumn ($column, &$value, $type=null) | |
Set bind variable to a column. | |
_assignBindColumns ($row) | |
Bind a variable to a value in the result row. | |
free () | |
Free the internal resources associated with result. |
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 3786 of file MDB2.php.
Referenced by MDB2_Result_oci8\fetchRow(), MDB2_Result_mysql\fetchRow(), and MDB2_BufferedResult_oci8\fetchRow().
MDB2_Result_Common::_getColumnNames | ( | ) |
Retrieve the names of columns returned by the DBMS in a query result.
private
Reimplemented in MDB2_Result_mysql, and MDB2_Result_oci8.
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 |
public
Definition at line 3754 of file MDB2.php.
References $type, 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. |
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 |
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 |
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 |
public
Reimplemented in MDB2_BufferedResult_oci8, MDB2_Result_mysql, and MDB2_Result_oci8.
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.
public
Reimplemented in MDB2_BufferedResult_oci8, MDB2_Result_mysql, and MDB2_Result_oci8.
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. |
public
Definition at line 3674 of file MDB2.php.
References PEAR\isError().
Referenced by MDB2_BufferedResult_oci8\fetchRow().
MDB2_Result_Common::getResource | ( | ) |
return the resource associated with the result object
public
MDB2_Result_Common::MDB2_Result_Common | ( | & | $db, |
& | $result, | ||
$limit = 0 , |
|||
$offset = 0 |
|||
) |
MDB2_Result_Common::nextResult | ( | ) |
Move the internal result pointer to the next available result.
public
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.
public
Reimplemented in MDB2_Result_mysql, and MDB2_Result_oci8.
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.
public
Reimplemented in MDB2_BufferedResult_mysql, and MDB2_BufferedResult_oci8.
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 |
public
Reimplemented in MDB2_BufferedResult_mysql, and MDB2_BufferedResult_oci8.
Definition at line 3432 of file MDB2.php.
References $rownum, fetchRow(), MDB2_ERROR_UNSUPPORTED, and MDB2_OK.
Referenced by MDB2_Result_oci8\fetchRow(), and MDB2_Result_mysql\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. |
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(), and MDB2_Result_Common().
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_oci8\fetchRow(), MDB2_Result_mysql\fetchRow(), MDB2_BufferedResult_oci8\fetchRow(), MDB2_BufferedResult_oci8\seek(), MDB2_BufferedResult_mysql\seek(), and seek().
MDB2_Result_Common::$types = array() |
Definition at line 3350 of file MDB2.php.
Referenced by setResultTypes().