File/query-defs.php

Description
Classes
Class Description
 class sqlquery SQLquery class An SQL Statement Text Container.
 class dbquery DB Query class This class is the one which executes queries against the connected database.
 class dbrows DB Rows class Renders a query into data and allows access to the data either directly or via the usual get first,last,next,previous cursor navigation.
 class dbrecords DB Records class Renders a query into data and allows access to the data either directly or via the usual get first,last,next,previous cursor navigation.
 class dbselect DB Select class A special case of the dbrecords class.
 class dbdelete DB Delete class A special case of the dbquery class. This is for deleting rows from the database.
Abstract class dbtablemod DB tablemod class Parent class for classes which only modify a single table. This means either update or inserts. This class is provided so we can define a common method for sequence definition.
 class dbinsert DB Insert class A special case of the dbtablemod class.
 class dbupdate DB Update class A special case of the dbquery class. This is for updating data in particular rows in the database.
 class dbseq DB seq class A class which allows the management and use of sequences.
Includes
 include_once ("datetime-defs.php") (line 29)

Date-time functions

Constants
NO_ROLLBACK_ON_FAIL = false (line 36)

Transaction response to failure - do nothing

NULLVALUE = "NULL!FIELD!VALUE" (line 41)

This value indicates a NULL field value for queries

ROLLBACK_ON_FAIL = true (line 34)

Transaction response to failure - rollback

Functions
begin_transaction (line 1190)

Begin a DB transaction

void begin_transaction ()
bool_from_db_value (line 1249)

Return true or false for boolean data returned by the current DB. This is to provide for boolean compatibility across all DBs.

  • return: true of false
bool bool_from_db_value (mixed $db_value)
  • mixed $db_value: Data to be interpreted as either true or false
commit (line 1226)

Commit a DB transaction

  • return: True if transaction committed
bool commit ()
dbcommand (line 1137)

Execute a DB command

A wrapper which caters for the 'command' type of SQL query where no results are reauired, such as for a DELETE or UPDATE, or INSERT etc. Returns true if all ok, otherwise returns false.

  • return: True if dbcommand succeeded
bool dbcommand (string $sql)
  • string $sql: An SQL statement in full
dbrecordset (line 1149)

A wrapper which caters for queries which will return a record set identifier for returning data.

  • return: Returns a resource ID for the recordset
resource dbrecordset (string $sql)
  • string $sql: An SQL statement in full
db_value_from_bool (line 1261)

Return boolean data compatible with the current DB, from boolean. This is to provide for boolean compatibility across all DBs.

  • return: Db-compatible boolean equivalent value
mixed db_value_from_bool (bool $bool)
  • bool $bool: Booean true or false to be returned as DB value
escape_string (line 1272)

Escape a string according to the requirements of the current DB.

  • return: Escaped version of the string
string escape_string (string $str)
  • string $str: String to be escaped.
get_current_sequencevalue (line 1173)

A wrapper to get the current sequence value from a named sequence..

  • return: The value of the current integer in this sequence
integer get_current_sequencevalue (string $sequencename, [string $table = ""], [string $column = ""])
  • string $sequencename: Name of the sequence
  • string $column: Name of the column sequence is on
  • string $table: Name of the table column is on
get_next_sequencevalue (line 1161)

A wrapper to get the next sequence value from a named sequence..

  • return: The value of the next integer in this sequence
integer get_next_sequencevalue (string $sequencename, [string $table = ""], [string $column = ""])
  • string $sequencename: Name of the sequence
  • string $column: Name of the column sequence is on
  • string $table: Name of the table column is on
lock (line 1297)

Take out a lock on a table or tables, in a given mode. The mode string is database-specific and will vary according to the implementation of its locking scheme.

void lock (string $tablelist, string $mode)
  • string $tablelist: List of tables to lock, comma-delimited
  • string $mode: Databes-specific locking-mode or type
rollback (line 1236)

Rollback a DB transaction

  • return: True if transaction rolled back
bool rollback ()
select_database (line 1309)

Global function to set the selected database to a new database. All subsequent queries will then act on that database.

void select_database ([string $db_name = ""])
  • string $db_name: Name of database to select - nullstring for 'default'.
start_transaction (line 1183)

Start a DB transaction. Alias for begin_transaction()

void start_transaction ()
transaction_failed (line 1200)

Return DB transaction failure status.

  • return: True if transaction failed
bool transaction_failed ()
transaction_open (line 1217)

Return DB transaction open status.

  • return: True if transaction already open
bool transaction_open ()
transaction_succeeded (line 1209)

Return DB transaction success status.

  • return: True if transaction succeeded
bool transaction_succeeded ()
unescape_string (line 1283)

Unescape a string according to the requirements of the current DB.

  • return: Unescaped version of the escaped string
string unescape_string (string $str)
  • string $str: String to be unescaped.

Documentation generated by phpDocumentor 1.3.0RC3