ManiaLib 1.0b1 API Reference

 Class DatabaseRecordSet

Description

Database query result

Located in /libraries/Database.php (line 197)


	
			
Class Constant Summary
 FETCH_ASSOC = MYSQL_ASSOC
 FETCH_BOTH = MYSQL_BOTH
 FETCH_NUM = MYSQL_NUM
Method Summary
 array fetchArray ([ $resultType = self::FETCH_ASSOC])
 array fetchAssoc ()
 object fetchObject (string $className, [ $params = array()])
 array fetchRow ()
 int recordCount ()
Methods
fetchArray (line 243)

Fetch a result row as an associative, a numeric array, or both

array fetchArray ([ $resultType = self::FETCH_ASSOC])
  • $resultType
fetchAssoc (line 234)

Fetch a result row as an associative array

array fetchAssoc ()
fetchObject (line 254)

Returns the current row of a result set as an object

object fetchObject (string $className, [ $params = array()])
  • string $className: The name of the class to instantiate, set the properties of and return. If not specified, a stdClass object is returned.
  • array $params: An optional array of parameters to pass to the constructor for class_name objects.
fetchRow (line 225)

Get a result row as an enumerated array

array fetchRow ()
recordCount (line 270)

Gets the number of rows in a result

int recordCount ()
Class Constants
FETCH_ASSOC = MYSQL_ASSOC (line 202)

Constants to use with DatabaseRecordSet::fetchArray()

FETCH_BOTH = MYSQL_BOTH (line 204)

Constants to use with DatabaseRecordSet::fetchArray()

FETCH_NUM = MYSQL_NUM (line 203)

Constants to use with DatabaseRecordSet::fetchArray()