API16

JTable/setDBO: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:




{{subst:Description:JTable/setDBO}}
 


===Syntax===
===Syntax===
Line 43: Line 43:




{{subst:SeeAlso:JTable/setDBO}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=setDBO
  category=setDBO
  category=JTable
  category=JTable
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 02:10, 25 March 2017

Description

Method to set the JDatabase connector object.



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



Examples

Code Examples