P4A_DB_SourceRead/write data from/to a database.
Note that P4A_DB_Source is case sensitive when handling schemas/tables/columns names, thus if your table name is "products" (lowercase) then type it lowercase in P4A too, if it is "PRODUCTS" (uppercase) then type it uppercase in P4A too and so on...
Located in /p4a/objects/data_sources/db_source.php (line 48)
P4A_Object | --P4A_Data_Source | --P4A_DB_Source
P4A_DB_Source
addJoin
(string $table, string $clausole, [array $fields = '*'], [string $schema = null])
P4A_DB_Source
addJoinFull
(string $table, string $clausole, [array $fields = '*'], [string $schema = null])
P4A_DB_Source
addJoinInner
(string $table, string $clausole, [array $fields = '*'], [string $schema = null])
P4A_DB_Source
addJoinLeft
(string $table, string $clausole, [array $fields = '*'], [string $schema = null])
P4A_DB_Source
addJoinRight
(string $table, string $clausole, [array $fields = '*'], [string $schema = null])
P4A_DB_Source
addMultivalueField
(string $fieldname, [string $table = null], [string $fk = null], [string $fk_field = null])
string
$_DSN
= null (line 53)
array
$_fields
= array() (line 73)
array
$_filters
= array() (line 108)
array
$_group
= array() (line 88)
array
$_join
= array() (line 78)
array
$_multivalue_fields
= array() (line 103)
string
$_query
= null (line 98)
string
$_schema
= null (line 68)
string
$_table
= null (line 63)
array
$_tables_metadata
= array() (line 113)
string
$_where
= null (line 83)
Inherited from P4A_Data_Source
P4A_Data_Source::$fields
P4A_Data_Source::$_is_read_only
P4A_Data_Source::$_limit
P4A_Data_Source::$_num_pages
P4A_Data_Source::$_num_rows
P4A_Data_Source::$_offset
P4A_Data_Source::$_order
P4A_Data_Source::$_page_limit
P4A_Data_Source::$_pointer
Inherited from P4A_Object
P4A_Object::$_helpers
P4A_Object::$_id
P4A_Object::$_map_actions
P4A_Object::$_name
P4A_Object::$_objects
P4A_Object::$_parent_id
addFilter (line 379)
addJoin (line 200)
Add a join (default join type is INNER)
addJoinCross (line 269)
Add a cross join
addJoinFull (line 256)
Add a full join
addJoinInner (line 214)
Add an inner join
addJoinLeft (line 228)
Add a left join
addJoinNatural (line 282)
Add a natural join
addJoinRight (line 242)
Add a right join
addMultivalueField (line 1100)
createDataField (line 502)
deleteRow (line 828)
Removes the row from the database
getAll (line 861)
Returns all rows as an associative array.
You can get only a subset of all rows using $from and $count parameters.
getDSN (line 128)
getFields (line 187)
getFilters (line 399)
getGroup (line 349)
getJoin (line 292)
Get all joins
getQuery (line 369)
getRowPosition (line 644)
getSchema (line 169)
getTable (line 151)
getWhere (line 313)
Get the where clausole (in SQL syntax)
isReadOnly (line 558)
gets/sets read only state
resetNumRows (line 1087)
row (line 572)
rowByPk (line 627)
saveRow (line 725)
Inserts/update the row to the database.
If you've multivalue fields be sure that the user can't change the value of primary keys or the record will be broken.
You can pass $fields_values and $pk_values if you want to save a row you created in a custom way bypassing internal data_fields.
setTable (line 142)
Sets the main table for this data source.
If you pass a database view here, remember that you have to call setPk() on this P4A_DB_Source and setSequence() on the P4A_Data_Fields (if needed) because those data won't be autodetected.
setWhere (line 302)
set the where clausole (in SQL syntax)
_composeGroupPart (line 1044)
_composeOrderPart (line 1051)
_composePkString (line 1064)
_composeSelectCountPart (line 1006)
_composeSelectCountQuery (line 895)
_composeSelectPart (line 973)
_composeSelectPkQuery (line 945)
_composeSelectQuery (line 928)
_composeSelectStructureQuery (line 912)
_composeWherePart (line 1029)
__wakeup (line 1136)
Inherited From P4A_Data_Source
P4A_Data_Source::__construct()
P4A_Data_Source::addOrder()
P4A_Data_Source::deleteRow()
P4A_Data_Source::dropOrder()
P4A_Data_Source::exportAsCSV()
P4A_Data_Source::exportToCSV()
P4A_Data_Source::firstPage()
P4A_Data_Source::firstRow()
P4A_Data_Source::getAll()
P4A_Data_Source::getAsCSV()
P4A_Data_Source::getNumPage()
P4A_Data_Source::getNumPages()
P4A_Data_Source::getNumRows()
P4A_Data_Source::getOffset()
P4A_Data_Source::getOrder()
P4A_Data_Source::getPageLimit()
P4A_Data_Source::getPk()
P4A_Data_Source::getPkRow()
P4A_Data_Source::getPkValues()
P4A_Data_Source::getRowNumber()
P4A_Data_Source::hasOrder()
P4A_Data_Source::isNew()
P4A_Data_Source::isSortable()
P4A_Data_Source::lastPage()
P4A_Data_Source::lastRow()
P4A_Data_Source::load()
P4A_Data_Source::newRow()
P4A_Data_Source::nextPage()
P4A_Data_Source::nextRow()
P4A_Data_Source::page()
P4A_Data_Source::prevPage()
P4A_Data_Source::prevRow()
P4A_Data_Source::row()
P4A_Data_Source::saveUploads()
P4A_Data_Source::setOrder()
P4A_Data_Source::setPageLimit()
P4A_Data_Source::setPk()
P4A_Data_Source::updateRowPosition()
Inherited From P4A_Object
P4A_Object::__construct()
P4A_Object::actionHandler()
P4A_Object::build()
P4A_Object::destroy()
P4A_Object::dropImplement()
P4A_Object::dropMethod()
P4A_Object::errorHandler()
P4A_Object::getId()
P4A_Object::getName()
P4A_Object::getObjectType()
P4A_Object::getParentID()
P4A_Object::implement()
P4A_Object::intercept()
P4A_Object::isActionTriggered()
P4A_Object::setName()
P4A_Object::setParentID()
P4A_Object::void()
P4A_Object::_loadHelper()
P4A_Object::__call()
Documentation generated on Tue, 02 Sep 2008 10:03:59 +0200 by phpDocumentor 1.4.2