Moodle  2.2.1
http://www.collinsharper.com
moodle_recordset Class Reference
Inheritance diagram for moodle_recordset:

Public Member Functions

 rewind ()
 close ()

Detailed Description

Abstract class for resultsets returned from database functions. This is a simple Iterator with needed recorset closing support.

The difference from old recorset is that the records are returned as objects, not arrays. You should use "foreach ($recordset as $record) {}" followed by "$recordset->close()".

Do not forget to close all recordsets when they are not needed anymore!

Definition at line 40 of file moodle_recordset.php.


Member Function Documentation

close ( ) [abstract]

Did we reach the end?

Returns:
boolean Free resources and connections, recordset can not be used anymore.
void

Reimplemented in test_recordset, pgsql_native_moodle_recordset, pdo_moodle_recordset, mysqli_native_moodle_recordset, oci_native_moodle_recordset, sqlsrv_native_moodle_recordset, and mssql_native_moodle_recordset.

rewind ( )

Returns current record - fields as object properties, lowercase

Returns:
object Returns the key of current row
int current row Moves forward to next row
void Rewinds are not supported!
void

Definition at line 64 of file moodle_recordset.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations