Difference between revisions of "JTable/ construct"
From Joomla! Documentation
< API15:JTable
(New page: ===Description===
Object constructor to set table and key field
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<...) |
|||
Line 25: | Line 25: | ||
| $key name of the primary key field in the table | | $key name of the primary key field in the table | ||
|- | |- | ||
− | | | + | | &$db |
| | | | ||
| $db object | | $db object |
Revision as of 12:31, 25 March 2010
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Object constructor to set table and key field
Template:Description:JTable/ construct
Syntax[edit]
__construct($table, $key, &$db)
Parameter Name | Default Value | Description |
---|---|---|
$table | $table name of the table in the db schema relating to child class | |
$key | $key name of the primary key field in the table | |
&$db | $db object |
Defined in[edit]
libraries/joomla/database/table.php
Importing[edit]
jimport( 'joomla.database.table' );
Source Body[edit]
function __construct( $table, $key, &$db )
{
$this->_tbl = $table;
$this->_tbl_key = $key;
$this->_db =& $db;
}
[Edit See Also] Template:SeeAlso:JTable/ construct
Examples[edit]
<CodeExamplesForm />