Class ezSQL_recordset

Description

Implements interfaces:

  • Iterator (internal interface)

ezSQL Database specific class for working with query results Desc..: recordset component (part of ezSQL databse abstraction library)

Located in /shared/ez_sql_recordset.php (line 12)


	
			
Class Constant Summary
RESULT_AS_ARRAY = 'array'
RESULT_AS_OBJECT = 'object'
RESULT_AS_ROW = 'row'
Method Summary
ezSQL_recordset __construct (array $ezSQL_queryresult)
stdClass/array current ([string $mode = self::RESULT_AS_OBJECT])
array ezSQL_fetch_row ()
int key ()
void next ()
void previous ()
void rewind ()
boolean valid ()
Methods
Constructor __construct (line 58)

Initializes the record object

  • throws: Exception When $ezSQL_queryresult is not an array
  • access: public
ezSQL_recordset __construct (array $ezSQL_queryresult)
  • array $ezSQL_queryresult: The result of an ezSQL query
current (line 82)

Returns the current row of the recordset as stdClass, which is the default mode, or as array as fieldname - fieldvalue.

  • access: public
stdClass/array current ([string $mode = self::RESULT_AS_OBJECT])
  • string $mode: Return the current row as array, or object Default is RESULT_AS_OBJECT

Implementation of:
Iterator::current
ezSQL_fetch_assoc (line 163)

Behaves like mysql_fetch_assoc. This method it to implement ezSQL easier in an existing system, that made us of mysql_fetch_assoc.

It returns the current record as an associative array and moves the internal data pointer ahead.

  • access: public
array ezSQL_fetch_assoc ()
ezSQL_fetch_object (line 201)

Behaves like mysql_fetch_object This method it to implement ezSQL easier in an existing system, that made us of mysql_fetch_object.

It returns n object with properties that correspond to the fetched row and moves the internal data pointer ahead.

  • access: public
array ezSQL_fetch_object ()
ezSQL_fetch_row (line 182)

Behaves like mysql_fetch_row This method it to implement ezSQL easier in an existing system, that made us of mysql_fetch_row.

It returns the current record as a numeric array and moves the internal data pointer ahead.

  • access: public
array ezSQL_fetch_row ()
key (line 123)

Returns the current position in the recordset

  • access: public
int key ()

Implementation of:
Iterator::key
next (line 130)

Sets the position of the recordset up by one

  • access: public
void next ()

Implementation of:
Iterator::next
previous (line 138)

Sets position of the recordset down by one, if the position is below the

start, the position is set to the start position

  • access: public
void previous ()
rewind (line 70)

Sets the position to zero

  • access: public
void rewind ()

Implementation of:
Iterator::rewind
valid (line 151)

Whether the current position contains a row, or not

  • access: public
boolean valid ()

Implementation of:
Iterator::valid
Class Constants
RESULT_AS_ARRAY = 'array' (line 17)

Returns the result as array

RESULT_AS_OBJECT = 'object' (line 22)

Returns the result as object of stdClass

RESULT_AS_ROW = 'row' (line 27)

Returns the result as numeric array

Documentation generated on Mon, 26 Aug 2013 23:22:24 +0200 by phpDocumentor 1.4.4