Actions

API16

JTable/setDBO

From Joomla! Documentation

< API16:JTable
Revision as of 05:05, 30 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Method to set the JDatabase connector object.

[Edit Descripton]

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;
}

[Edit See Also] SeeAlso:JTable/setDBO

Examples

<CodeExamplesForm />