Class Data

Description

Located in /lib/Data.php (line 20)


	
			
Method Summary
 Data __construct ()
 void __destruct ()
 array arrayQuery (string $sql)
 void connect ()
 void disconnect ()
 resultset exec (string $sql)
 array fetchArray ([string $result = 'default'])
 array fetchAssoc ([string $result = 'default'])
 array fetchRow ([string $result = 'default'])
 bool hasMoreRows ()
 resultset query (string $sql)
Methods
Constructor __construct (line 48)

Constructor. All it does is connect the data source.

Data __construct ()
Destructor __destruct (line 56)

Destructor. Reversed constructors work (disconnects database).

void __destruct ()
arrayQuery (line 227)

Convenience function. Querys database and fetches first row as array with one method call.

  • access: public
array arrayQuery (string $sql)
  • string $sql: Query to execute
connect (line 67)

Parameterless database connectivity. Access information is provided by the Config data.

void connect ()
disconnect (line 94)

Reversed connect(). Shuts down connection if it is still open.

  • access: public
void disconnect ()
exec (line 141)

Similar to query(), but does not set record counter. Use for manipulation queries (insert, delete, etc.). If record counter is needed for processing, use query().

resultset exec (string $sql)
  • string $sql: The sql statement to execute.
fetchArray (line 177)

Fetches a single row from the currently selected result set or the supplied result set (if on is supplied) as an array. Uses both numeric and associative keys.

  • access: public
array fetchArray ([string $result = 'default'])
  • string $result: Result result of query to retrieve from (optional).
fetchAssoc (line 195)

Fetches a single row from the currently selected result set or the supplied result set (if on is supplied) as an array. Uses only associative keys.

  • access: public
array fetchAssoc ([string $result = 'default'])
  • string $result: Result result of query to retrieve from (optional).
fetchRow (line 159)

Fetches a single row from the currently selected result set or the supplied result set (if one is supplied).

  • access: public
array fetchRow ([string $result = 'default'])
  • string $result: Result result of query to retrieve from (optional).
hasMoreRows (line 211)

Returns true if the counter has not yet reached zero (which happens when the last record has been retrieved). False otherwise.

  • access: public
bool hasMoreRows ()
query (line 115)

Querys the currently open database using supplied sql statement.

Sets the record counter for processing. Use for select queryies. If processing is not needed (insert, etc.) use exec().

resultset query (string $sql)
  • string $sql: The sql statment to query against the database.

Documentation generated on Mon, 25 Oct 2004 15:26:17 -0700 by phpDocumentor 1.3.0RC3