Class Dal

Description

The base Max Database Data Access Layer class.

Located in /maintenance/libraries/max/Dal.php (line 38)


	
			
Direct descendents
Class Description
Abstract class Dal_Statistics_Common An abstract class that defines the interface and some common methods for the data access layer code for summarising raw data into statistics, for all Max modules.
Variable Summary
 mixed $conf
Method Summary
 Dal Dal ()
 void affectedRows ()
 void execute (text $sql, resource &$result)
 integer executeIgnoreErrors (text $sql, resource &$result, mixed $errors, array $error)
 void fetchResultAsArray (resource &$result)
 void numberOfRows (resource &$result)
Variables
mixed $conf (line 40)
mixed $dbConnection (line 41)
Methods
Constructor Dal (line 46)

The constructor method - connects to the database.

Dal Dal ()
affectedRows (line 168)

A method for returning the number of rows affected by a SQL statement executed (immediately) previously.

void affectedRows ()
execute (line 90)

A method for executing SQL statements.

Aborts execution of the entire PHP script if the SQL statement results in an error from MySQL.

void execute (text $sql, resource &$result)
  • text $sql: The SQL statement to execute.
  • resource $result: A reference to the MySQL result resouce.
executeIgnoreErrors (line 115)

A method for executing SQL statements that might cause non-fatal errors.

Aborts execution of the entire PHP script if the SQL statement results in an error from MySQL, unless the MySQL error code is found in the array of supplied error codes.

  • return: The error number ignored, if executed with errors, or 0 if there were no errors.
integer executeIgnoreErrors (text $sql, resource &$result, mixed $errors, array $error)
  • text $sql: The SQL statement to execute.
  • resource $result: A reference to the MySQL result resouce.
  • array $error: An array of integer MySQL error codes that will be ignored (ie. won't halt the execution of the PHP script).
fetchResultAsArray (line 157)

A method for fetching the data returned by a SQL statement into an array.

void fetchResultAsArray (resource &$result)
  • resource &$result: result $result A MySQL resource result.
numberOfRows (line 147)

A method for fetching the number of rows returned by a SQL statement.

void numberOfRows (resource &$result)
  • resource &$result: result $result A MySQL resource result.
singleton (line 73)

The singleton method to create or return a single instance of the class.

  • return: The returned Dal object.
  • static:
Dal &singleton ()

Redefined in descendants as:

Documentation generated on Fri, 24 Dec 2004 13:01:49 +0000 by phpDocumentor 1.3.0RC3