PHPonTraxTest
[ class tree: PHPonTraxTest ] [ index: PHPonTraxTest ] [ all elements ]

Class: DB_result

Source Location: /test/mockDB/DB.php

Class Overview


Mock DB_result


Author(s):

Methods


Child classes:

DB_find_all_result
Mock DB_result

Class Details

[line 2315]
Mock DB_result



Tags:

todo:  Implement mock DB_result


[ Top ]


Class Methods


constructor DB_result [line 2327]

void DB_result( object &$dbh, resource $result, [array $options = array()])

This constructor sets the object's properties



Tags:

todo:  Implement mock DB_result::constructor


Parameters:

object   &$dbh   the DB object reference
resource   $result   the result resource id
array   $options   an associative array with result options

[ Top ]

method fetchInto [line 2427]

mixed fetchInto( array &$arr, [int $fetchmode = DB_FETCHMODE_DEFAULT], [int $rownum = null])

Fetch a row of data into an array which is passed by reference



Tags:

return:  DB_OK if a row is processed, NULL when the end of the result set is reached or a DB_Error object on failure
todo:  Implement mock DB_result::fetchInto()
see:  DB_common::setOption(), DB_common::setFetchMode()


Parameters:

array   &$arr   the variable where the data should be placed
int   $fetchmode   the constant indicating how to format the data
int   $rownum   the row number to fetch (index starts at 0)

[ Top ]

method fetchRow [line 2363]

mixed &fetchRow( [int $fetchmode = DB_FETCHMODE_DEFAULT], [int $rownum = null])

Fetch a row of data and return it by reference into an array



Tags:

return:  an array or object containing the row's data, NULL when the end of the result set is reached or a DB_Error object on failure.
todo:  Implement mock DB_result::fetchRow()
see:  DB_common::setOption(), DB_common::setFetchMode()


Overridden in child classes as:

DB_find_all_result::fetchRow()

Parameters:

int   $fetchmode   the constant indicating how to format the data
int   $rownum   the row number to fetch (index starts at 0)

[ Top ]

method free [line 2537]

bool free( )

Frees the resources allocated for this result set



Tags:

return:  true on success. A DB_Error object on failure.
todo:  Implement mock DB_result::free()


[ Top ]

method getQuery [line 2554]

string getQuery( )

Determine the query string that created this result



Tags:

return:  the query string
todo:  Implement mock DB_result::getQuery()


[ Top ]

method getRowCounter [line 2565]

integer getRowCounter( )

Tells which row number is currently being processed



Tags:

return:  the current row being looked at. Starts at 1.
todo:  Implement mock DB_result::getRowCounter()


[ Top ]

method nextResult [line 2526]

bool nextResult( )

Get the next result if a batch of queries was executed



Tags:

return:  true if a new result is available or false if not
todo:  Implement mock DB_result::nextResult()


[ Top ]

method numCols [line 2486]

int numCols( )

Get the the number of columns in a result set



Tags:

return:  the number of columns. A DB_Error object on failure.
todo:  Implement mock DB_result::numCols()


[ Top ]

method numRows [line 2497]

int numRows( )

Get the number of rows in a result set



Tags:

return:  the number of rows. A DB_Error object on failure.
todo:  Implement mock DB_result::numRows()


[ Top ]

method setOption [line 2339]

void setOption( string $key, [mixed $value = null])

Set options for the DB_result object



Tags:

todo:  Implement mock DB_result::setOption()


Parameters:

string   $key   the option to set
mixed   $value   the value to set the option to

[ Top ]


Documentation generated on Thu, 04 May 2006 19:47:32 -0600 by phpDocumentor 1.3.0RC4