Overview

Namespaces

  • DedicatedApi
    • Structures
    • Xmlrpc
  • ManiaLib
    • Gui
      • Cards
        • Dialogs
        • Navigation
      • Elements
      • Layouts
      • Maniacode
        • Elements
    • Utils
  • ManiaLive
    • Application
    • Config
    • Data
    • Database
      • MySQL
      • SQLite
    • DedicatedApi
      • Callback
    • Event
    • Features
      • Admin
      • ChatCommand
      • Tick
      • WebServices
    • Gui
      • Controls
      • Elements
      • Windows
    • PluginHandler
    • Threading
    • Utilities
  • ManiaLiveApplication
  • Maniaplanet
    • WebServices
      • ManiaConnect
      • ManiaHome
      • Rankings
  • PHP

Classes

  • Connection
  • RecordSet
  • Overview
  • Namespace
  • Class
  • Tree

Class Connection

ManiaLive\Database\Connection
Extended by ManiaLive\Database\MySQL\Connection implements ManiaLive\Features\Tick\Listener
Namespace: ManiaLive\Database\MySQL
Located at libraries/ManiaLive/Database/MySQL/Connection.php
Methods summary
public
# __construct( mixed $host, mixed $username, mixed $password, mixed $database, mixed $port )
public
# onTick( )

Event launch every seconds

Event launch every seconds

Implementation of

ManiaLive\Features\Tick\Listener::onTick()
protected
# connect( mixed $database )
public resource
# getHandle( )

Returns

resource

See

ManiaLive\Database.Connection::getHandle()
public
# setCharset( string $charset )

Set the charset used to communicate with the database

Set the charset used to communicate with the database

Parameters

$charset
string
$charset
public
# select( string $database )

select the given database

select the given database

Parameters

$database
string
$database
public string
# quote( string $string )

Escape and add quotes around the given string

Escape and add quotes around the given string

Parameters

$string
string
$string

Returns

string
public ManiaLive\Database\RecordSet
# execute( string $query )

Execute a query and return the result

Execute a query and return the result

Parameters

$query
string
$query

Returns

ManiaLive\Database\RecordSet
public integer
# affectedRows( )

Return the number of rows affected by the previous query

Return the number of rows affected by the previous query

Returns

integer
public integer
# insertID( )

Return the id of the last insert query

Return the id of the last insert query

Returns

integer
public boolean
# isConnected( )

Return true if the connection to the database is open, false in the other cases

Return true if the connection to the database is open, false in the other cases

Returns

boolean
public
# disconnect( )

Close the current connection to the database

Close the current connection to the database

public string
# getDatabase( )

Get the selected database

Get the selected database

Returns

string
public boolean
# tableExists( string $tableName )

Check if the given table exists

Check if the given table exists

Parameters

$tableName
string
$table

Returns

boolean
Methods inherited from ManiaLive\Database\Connection
endMeasuring(), getConnection(), getMeasuredAverageTimes(), startMeasuring()
Properties summary
protected mixed $connection
#
protected mixed $host
#
protected mixed $user
#
protected mixed $password
#
protected mixed $database
#
protected integer $tick 0
#
Properties inherited from ManiaLive\Database\Connection
$id
ManiaLiveDoc API documentation generated by ApiGen 2.8.0