Packageindex Classtrees Modulegroups Elementlist Report XML Files

pxdb.content

pxdb_picktable

pxdb_picktable

private class pxdb_picktable

To access additional fields of your table beyond id and name, you have to specify the field list in access_table()

AuthorsSandy Smith <ssmith@forumone.com>
Version$Revision: 1.2 $

 
Direct known subclasses: pxdb_picktable_tree

Public Method Summary

void pxdb_picktable([ string $table_name ])
Constructor
boolean set_table([ string $table ])
Sets the picktable to be accessed.
string get_table()
Gets the name of the picktable that is being accessed.
array get_picktable_array([ string $table ])
Dump the entire picktable into an array.
array get_listwidget_array([ string $table ], string $value_field)
Dump the entire picktable into an array formatted for use with listWidget
object ADOResultSet access_picktable([ string $table, string $field_list ])
Set the SQL and execute to get a resultset for the picktable
boolean set_orderby([ string $orderby ])
Set the order of fields (one or more, in a comma-delimited list) to order results by
boolean get_orderby()
Set the order of fields (one or more, in a comma-delimited list) to order results by
boolean get_resultset()
This method allows you to get a reference to the resultset object.
array get_fields([ string $table ])
Looks up the columns of a picktable based on a passed table name.
integer lookup_value(string $label, [ string $table ])
Takes a label and looks up the value (id) associated with it. Useful for
string lookup_label(integer $value, [ string $table ])
Takes a pick value (id) and looks up the label associated with it. Useful for

Private Method Summary

void use_datatype_types(integer $datatype)
Convenience function for setting the table to use a name based on a datatype identifier (id)

Private Field Summary

object ADOConnection $_db
ADOConnection instance
$_rs
The record set of current fetch.
$_sql
The SQL that generated the current record set.
string $_orderby
Stores order by for SQL.
array $_tables
List of picktables
array $_columns
List of picktable columns

Public Method Details

pxdb_picktable

public void pxdb_picktable([ string $table_name ])

 

Parameter
string $table_name = >>null<<
Optional name of table to be accessed
Returns void


set_table

public boolean set_table([ string $table ])

 

Parameter
string $table = >>null<<
The name of the table to be accessed
Returns boolean


get_table

public string get_table()

 

Returns string


get_picktable_array

public array get_picktable_array([ string $table ])

 

Parameter
string $table = >>null<<
optional list of fields & aliases to be returned
Returns array


get_listwidget_array

public array get_listwidget_array([ string $table ], string $value_field)

 

Parameter
string $table = >>null<<
optional name of the picktable to be accessed
string $value_field
Warning: documentation is missing.
Returns array

Author(s) Nyk Cowham <nyk@forumone.com>

access_picktable

public object ADOResultSet access_picktable([ string $table, string $field_list ])

 

Parameter
string $table = >>null<<
optional name of the picktable to be accessed
string $field_list = >>null<<
optional list of fields & aliases to be returned
Returns object ADOResultSet

on success, boolean false on failure


set_orderby

public boolean set_orderby([ string $orderby ])

 

Parameter
string $orderby = >>null<<
The SQL to order the results
Returns boolean


get_orderby

public boolean get_orderby()

 

Returns boolean


get_resultset

public boolean get_resultset()

 

Returns boolean

True /false on success.


get_fields

public array get_fields([ string $table ])

 

Parameter
string $table = >>null<<
optional name of the picktable to be accessed
Returns array

Array of column names for that picktable.


lookup_value

public integer lookup_value(string $label, [ string $table ])

  situations where you need to build links to related objects.

Parameter
string $label
The label given from a pxdb_record output class
string $table = >>null<<
The name of the table to lookup from (optional)
Returns integer

value (id) of a given label, false if not found


lookup_label

public string lookup_label(integer $value, [ string $table ])

  situations where you need to do a table lookup.

Parameter
integer $value
The value given from a pxdb_record output class
string $table = >>null<<
The name of the table to lookup from (optional)
Returns string

value (label) of a given id, false if not found


Private Method Details

use_datatype_types

private void use_datatype_types(integer $datatype)

 

Parameter
integer $datatype
id
Returns void


Private Field Details

$_db

private object ADOConnection $_db

>><<


$_rs

private $_rs

>>null<<


$_sql

private $_sql

>>null<<


$_orderby

private string $_orderby

>><<


$_tables

private array $_tables

>>array()<<


$_columns

private array $_columns

>>array()<<



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Fri, 28 Apr 2006 19:07:22 -0400 by PHPDoc v1.5 www.phpdoc.de