Rev 1 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
DBDatabase
methods
__construct( $databaseName, $tableDefinitionArray = '', $displayOptions = '' )
toHTML
toArray
getTable( $name )
doAdmin( $returnPage = 'admin.php' ) // no longer in use
properties
$databaseName // string with the name of the database
$tables // array of DBTables
$displayOptions; // array, not used
$defaultTable; // string with name of default table for processing
DBTable
methods
__construct( $tableName, $displayName = '', $displayColumns = '', $displayQuery = '', $columnDefinitionArray = '', $queries = '' )
makeQuery( $type = 'list' )
columnDefinitionsArrayToObject ( $arr )
getOneRowQuery ( $keyValues )
join ( $arrays, $glue = ',', $pre='', $post='' )
getSelectQuery( $type='list', $parameters = '' )
toArray( $parameters = '' )
toHTML( $id='' )
properties
$tableName;
$columns;
$displayName;
$displayColumns;
$displayQuery;
$queries;
DBRecord
methods
__construct( $table, $keyValues = '' )
loadFromDatabase ( $keyValues = '' )
saveToDatabase()
* toArray
toHTML( $keyValues = '' )
properties
$table;
$keyValues;
DBColumn
methods
__construct ( $columnName, $definition = '', $value='')
__toString()
valueTemplate( $newValue = '' )
headerTemplate( $newValue = '' )
inputTemplate( $newValue = '' )
replaceTokens ( $string, $values )
makeSafeSQLValue ( $value = '' )
displayHTML ($template = '')
HTMLColumnName ($template = '')
HTMLInputField ($template = '')
properties
$columnName; // name in database
$primaryKey; // true if this is a member of the primary key
$displayName; // human readable name, uses $columnName if not defined
$value; // in most cases, can hold the actual value (not type file or manyToMany)
$required; // if false, may be set to null
$default; // for not null columns, what value to use if it is null. Also displayed on creation of an insert new row screen
$readOnly; // if set, an input field will not be created for this column; it will be displayed instead.
$width; // width of input field and/or html display
$nullable; // true/false if it can be null (as opposed to empty)