API16

JTable/setDBO: Difference between revisions

From Joomla! Documentation

Doxiki (talk | contribs)
New page: ===Description=== Method to set the JDatabase connector object. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowik...
 
Doxiki (talk | contribs)
No edit summary
Line 17: Line 17:
!Description
!Description
|-
|-
|  
| &$db
|  
|  
|  A  connector object to be used by the table object.  
|  A  connector object to be used by the table object.  

Revision as of 10:05, 30 March 2010

Description

Method to set the JDatabase connector object.

[Edit Descripton]

Template: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] Template:SeeAlso:JTable/setDBO

Examples

<CodeExamplesForm />