JTable/setDBO: Difference between revisions
From Joomla! Documentation
No edit summary |
m clean up |
||
| Line 2: | Line 2: | ||
Method to set the JDatabase connector object. | Method to set the JDatabase connector object. | ||
{{Description:JTable/setDBO}} | |||
{{subst:Description:JTable/setDBO}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 44: | Line 42: | ||
</source> | </source> | ||
{{subst:SeeAlso:JTable/setDBO}} | |||
{{SeeAlso:JTable/setDBO}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:29, 24 March 2017
Description
Method to set the JDatabase connector object.
{{subst:Description:JTable/setDBO}}
Syntax
setDBO(&$db)
| Parameter Name | Default Value | Description |
|---|---|---|
| &$db | A connector object to be used by the table object. |
Returns
boolean True on success.
Defined in
libraries/joomla/database/table.php
Importing
jimport( 'joomla.database.table' );
Source Body
public function setDBO(&$db)
{
// Make sure the new database object is a JDatabase.
if (!$db instanceof JDatabase) {
return false;
}
$this->_db = &$db;
return true;
}
{{subst:SeeAlso:JTable/setDBO}}
Examples
<CodeExamplesForm />