Class DB

Description

The database access class.

This class essentially wraps the "AnyDB" class by Lennart Groetzbach

Located in /core/db.class.inc (line 19)


	
			
Method Summary
DB __construct ()
void __destruct ()
Mixed affectedRows ()
Mixed escapeStr (Mixed $str, [Array $keys = null])
Mixed execute (String $query, [Integer $resultType = ANYDB_PREDEFINED_VALUE])
Mixed getAll ([Integer $resultType = ANYDB_PREDEFINED_VALUE])
void getGoodDBURLName (mixed $thisname)
Mixed getInsertId ()
Mixed getNext ([Integer $resultType = ANYDB_PREDEFINED_VALUE])
Mixed numRows ()
Boolean query (String $query)
Methods
Constructor __construct (line 26)

constructs a new DB object

DB __construct ()
Destructor __destruct (line 44)

destructs the DB object, freeing up all resources

void __destruct ()
affectedRows (line 171)

Returns how many rows were affected by the last statement

  • return: Integer or FALSE
  • access: public
  • abstract:
Mixed affectedRows ()
escapeStr (line 132)

Modifies a string to make it secure to add to the db

  • return: String or FALSE
  • access: public
  • abstract:
Mixed escapeStr (Mixed $str, [Array $keys = null])
  • Mixed $str: a string or an array
  • Array $keys: if not null it specifies which key names to use
execute (line 86)

Executes a statement and returns the result table

  • return: 2-dimensional array or FALSE
  • access: public
  • abstract:
Mixed execute (String $query, [Integer $resultType = ANYDB_PREDEFINED_VALUE])
  • String $query: a sql statement
  • Integer $resultType: should the array have numeric, associative keys, or both
getAll (line 70)

Returns the resulting table in an 2-dimensional array

  • return: 2-dimensional array
  • access: public
Mixed getAll ([Integer $resultType = ANYDB_PREDEFINED_VALUE])
  • Integer $resultType: should the array have numeric, associative keys, or both
getGoodDBURLName (line 176)
  • access: public
void getGoodDBURLName (mixed $thisname)
getInsertId (line 145)

Returns the id of the last insert operation

  • return: int or FALSE
  • access: public
Mixed getInsertId ()
getNext (line 101)

Returns the next row in an array

  • return: 1-dimensional array or FALSE
  • access: public
  • abstract:
Mixed getNext ([Integer $resultType = ANYDB_PREDEFINED_VALUE])
  • Integer $resultType: should the array have numeric, associative keys, or both
numRows (line 158)

Returns how many rows are in the result set

  • return: TRUE, if successful
  • access: public
  • abstract:
Mixed numRows ()
query (line 57)

Submits an sql statement to the db

  • return: TRUE, if successful
  • access: public
Boolean query (String $query)
  • String $query

Documentation generated on Tue, 4 Oct 2005 21:59:05 -0700 by phpDocumentor 1.3.0RC3