DataResultMysql

DataResultMysql handles retrieving row data from the mysql database

see

DataResult

Summary
DataResultMysql handles retrieving row data from the mysql database
holds the format of the result set, NUM, ASSOC or BOTH @access private @var int row format return type
DataResultMysql constructor
gets the result array format
sets the format of the result array to either 0-indexed (default), associative (with column names) or both
returns a row of data from the mysql database result resource.
resets cursor to beginning of dataset
returns number of rows from resulting from select query
returns number of fields in result set

Variables

format

private $format

holds the format of the result set, NUM, ASSOC or BOTH @access private @var int row format return type

Functions

__construct

public function __construct($result)

DataResultMysql constructor

parameters

resultmysql database result resource

getFormat

public function getFormat()

gets the result array format

returns

formatformat integer value

setFormat

public function setFormat($format)

sets the format of the result array to either 0-indexed (default), associative (with column names) or both

parameters

formatstring indicating format to set

getRow

protected function getRow()

returns a row of data from the mysql database result resource. if no more rows in resource, returns false

returns

ArrayObject or false

dataSeek

protected function dataSeek($row_num =  0)

resets cursor to beginning of dataset

returns

boolean indicating seek was succesful

getNumRows

public function getNumRows()

returns number of rows from resulting from select query

returns

integer indicating number of rows in result set

getNumFields

public function getNumFields()

returns number of fields in result set

returns

integer indicating number of fields in result set

private $format
holds the format of the result set, NUM, ASSOC or BOTH @access private @var int row format return type
public function __construct($result)
DataResultMysql constructor
public function getFormat()
gets the result array format
public function setFormat($format)
sets the format of the result array to either 0-indexed (default), associative (with column names) or both
protected function getRow()
returns a row of data from the mysql database result resource.
protected function dataSeek($row_num =  0)
resets cursor to beginning of dataset
public function getNumRows()
returns number of rows from resulting from select query
public function getNumFields()
returns number of fields in result set