File/includes/dbtable.php

Description
Functions
dbtable_add (line 399)

Add a row into a table (SQL insert)

void dbtable_add ($tablear $tablear, $tablename $tablename, $valuesar $valuesar)
  • $tablear $tablear: - db table (defined in tables.php)
  • $tablename $tablename: - db table name
  • $valuesar $valuesar: - array of values
dbtable_build_name_index (line 535)

Convert an array of db values (with index values 0,1,2,...

into an associative array (with index values of table column names).

void dbtable_build_name_index ($tablear $tablear, $valuesar $valuesar)
  • $tablear $tablear: - db table (defined in tables.php)
  • $valuesar $valuesar: - array of values
dbtable_delete (line 354)

Delete a single row of a db table

void dbtable_delete ($tablear $tablear, $tablename $tablename, $keys $keys)
  • $tablear $tablear: - db table (defined in tables.php)
  • $tablename $tablename: - db table name
  • $keys $keys: - array of db key fields (field tagged with "iskey" => 1)
dbtable_genid (line 515)

Generate a new ID

void dbtable_genid ( $tablename,  $field)
  • $tablename
  • $field
dbtable_get_field_index (line 12)
void dbtable_get_field_index ($tablear $tablear,  $fieldname)
  • $tablear $tablear: - array that defines table (see tables.php)
  • $fieldname
dbtable_html_list (line 159)

Print rows of a table into an HTML table.

The first column will include (optionally) href links to a page which can show further details.

void dbtable_html_list ($tablear $tablear, $tablename $tablename, $href $href, $fields $fields, $keys $keys, $order $order)
  • $tablear $tablear: - db table (defined in tables.php)
  • $tablename $tablename: - db table name
  • $href $href: - URL (%0 will be replaced with field field 0)
  • $fields $fields: - list of fields to include in table.
  • $keys $keys: - array of db key fields (field tagged with "iskey" => 1)
  • $order $order: - SQL order text
dbtable_load (line 285)

Load a single row of a db table

void dbtable_load ($tablear $tablear, $tablename $tablename, $keys $keys)
  • $tablear $tablear: - db table (defined in tables.php)
  • $tablename $tablename: - db table name
  • $keys $keys: - array of db key fields (field tagged with "iskey" => 1)
dbtable_to_html (line 32)

Create a table for editing a database table entry

void dbtable_to_html ($tablear $tablear, $valuesar $valuesar, [$action $action = ''], [$actionlabel $formname = ''], [$hidden $actionlabel = ''], [ $hidden = ''])
  • $tablear $tablear: - array that defines table (see tables.php)
  • $valuesar $valuesar: - array of current values
  • $action $action: - URL to post form to (or '' for display-only)
  • $actionlabel $formname: - Value to put on submit form ("Save", etc.)
  • $hidden $actionlabel: - array of hidden form variables (name1,value1,name2,value2,...)
  • $hidden
dbtable_update (line 454)

Update a row in a table (SQL update)

void dbtable_update ($tablear $tablear, $tablename $tablename, $valuesar $valuesar)
  • $tablear $tablear: - db table (defined in tables.php)
  • $tablename $tablename: - db table name
  • $valuesar $valuesar: - array of values

Documentation generated on Thu, 10 Jun 2010 17:08:22 -0400 by phpDocumentor 1.4.3