API16

API16:JTable/setDBO

From Joomla! Documentation

Revision as of 14:29, 24 March 2017 by JoomlaWikiBot (talk | contribs) (clean up)

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 />