Class DatabaseMysqliResult

Description

MySQL database result

This implements access to database result sets

Located in /program/lib/database/mysqli.class.php (line 1056)


	
			
Variable Summary
 resource $db_link
 integer $errno
 string $error
 integer $num_rows
 resource $result
Method Summary
 void DatabaseMysqliResult (resource $db_link,  $result)
 bool close ()
 array fetch_all ()
 array fetch_all_assoc ([string $keyfield = ''])
 array|bool fetch_row ()
 array|bool fetch_row_assoc ()
Variables
resource $db_link (line 1070)
  • var: $db_link is the database link identifier
integer $errno (line 1061)
  • var: the error number generated by the latest mysqli command
string $error (line 1064)
  • var: the error message generated by the latest mysqli command
integer $num_rows (line 1067)
  • var: the number of rows in the result set
resource $result (line 1058)
  • var: the resource associated with the result set
Methods
Constructor DatabaseMysqliResult (line 1076)

constructor

void DatabaseMysqliResult (resource $db_link,  $result)
  • resource $db_link: the resource associated with the result set
  • $result
close (line 1089)

free the memory associated with the result set

  • return: FALSE on failure, TRUE otherwise
bool close ()
fetch_all (line 1121)

fetch all rows as a 0-based array of 0-based enumerated arrays

  • return: an array containing 0 or more result rows as 0-based arrays
array fetch_all ()
fetch_all_assoc (line 1141)

fetch all rows as an array (0-based or keyed) of associative arrays

This returns an array of assoc arrays (one per record). If $key is not empty, we use the contents of the field as the array key, otherwise we simply use a 0-based numeric key. By specifying a single unique field (e.g. the primary key) all records in the array can be accessed via their unique value.

  • return: an array containing 0 or more result rows as associative arrays
array fetch_all_assoc ([string $keyfield = ''])
  • string $keyfield: field to use as the key in the returned array or empty for 0-based numeric array key
fetch_row (line 1101)

fetch the next result row as a 0-based enumerated array

  • return: FALSE if there are no more rows, or a 0-based array corresponding to a row
array|bool fetch_row ()
fetch_row_assoc (line 1111)

fetch the next result row as a associative array

  • return: FALSE if there are no more rows, or an associative array corresponding to a row
array|bool fetch_row_assoc ()

Documentation generated on Tue, 28 Jun 2016 19:10:46 +0200 by phpDocumentor 1.4.0