API16

JDatabaseMySQL/connected: Difference between revisions

From Joomla! Documentation

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


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=connected
  category=connected
  category=JDatabaseMySQL
  category=JDatabaseMySQL
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 01:27, 25 March 2017

Description

Determines if the connection to the server is active.


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

Syntax

connected()


Returns

boolean

Defined in

libraries/joomla/database/database/mysql.php

Importing

jimport( 'joomla.database.database.mysql' );

Source Body

public function connected()
{
        if (is_resource($this->_connection)) {
                return mysql_ping($this->_connection);
        }
        return false;
}


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

Examples

Code Examples