Actions

API16

JDatabase/ construct

From Joomla! Documentation

< API16:JDatabase
Revision as of 21:57, 12 May 2013 by JoomlaWikiBot (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

Database object constructor

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

__construct($options)
Parameter Name Default Value Description
$options List of options used to configure the connection

Defined in

libraries/joomla/database/database.php

Importing

jimport( 'joomla.database.database' );

Source Body

public function __construct($options)
{
        $prefix = array_key_exists('prefix', $options) ? $options['prefix'] : 'jos_';
 
        // Determine utf-8 support.
        $this->_utf = $this->hasUTF();
 
        // Set charactersets (needed for MySQL 4.1.2+).
        if ($this->_utf){
                $this->setUTF();
        }
 
        $this->_table_prefix    = $prefix;
        $this->_ticker                  = 0;
        $this->_errorNum                = 0;
        $this->_log                             = array();
        $this->_quoted                  = array();
        $this->_hasQuoted               = false;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />