API16

JTable/setDBO

From Joomla! Documentation

< API16:JTable

The "API16" 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]

Method to set the JDatabase connector object.



Syntax[edit]

setDBO(&$db)
Parameter Name Default Value Description
&$db A connector object to be used by the table object.

Returns[edit]

boolean True on success.

Defined in[edit]

libraries/joomla/database/table.php

Importing[edit]

jimport( 'joomla.database.table' );

Source Body[edit]

public function setDBO(&$db)
{
        // Make sure the new database object is a JDatabase.
        if (!$db instanceof JDatabase) {
                return false;
        }

        $this->_db = &$db;
        return true;
}



Examples[edit]

Code Examples[edit]