Class DBRecord
A Base class to use for records which will be read/written from the database.
Direct known subclasses
UserCopyright: Catalyst IT Ltd, Morphoss Ltd http://www.morphoss.com/
License: GNU GPL v2 or later
Author: Andrew McMillan andrew@mcmillan.net.nz
Located at DataUpdate.php
public
|
|
public
|
#
Initialise( string $table, array $keys = array() )
This will read the record from the database if it's available, and the $keys parameter is a non-empty array. |
public
|
|
public
|
#
PostToValues( $prefix = "" )
This will assign $_POST values to the internal Values object for each field that exists in the Fields array. |
public
string
|
|
public
string
|
|
public
string
|
#
_BuildWhereClause( boolean $overwrite_values = false )
Builds a where clause to match the supplied keys |
public
mixed
|
|
public
mixed
|
|
public
mixed
|
|
public
boolean
|
|
public
boolean
|
public
string
|
$Table
The database table that this record goes in |
|
public
array
|
$Fields
The field names for the record. The array index is the field name and the array value is the field type. |
|
public
array
|
$Keys
The keys for the record as an array of key => value pairs |
|
public
object
|
$Values
The field values for the record |
|
public
object
|
$WriteType
The type of database write we will want: either "update" or "insert" |
|
public
array
|
$OtherTable
A list of associated other tables. |
|
public
array
|
$OtherTargets
The field names for each of the other tables associated. The array index is the table name, the string is a list of field names (and perhaps aliases) to stuff into the target list for the SELECT. |
|
public
array
|
$OtherJoin
An array of JOIN ... clauses. The first array index is the table name and the array value is the JOIN clause like "LEFT JOIN tn t1 USING (myforeignkey)". |
|
public
array
|
$OtherWhere
An array of partial WHERE clauses. These will be combined (if present) with the key where clause on the main table. |
|
public
object
|
$EditMode
The mode we are in for any form |