Methods summary
public static
ManiaLive\Database\Connection
|
#
getConnection( string $host = 'localhost', string $username = 'root', string $password = '', string $database = 'manialive', string $type = 'MySQL', integer $port = null )
Factory method that will create and manage database connections.
Factory method that will create and manage database connections.
Parameters
- $host
string $host
- $username
string $username
- $password
string $password
- $database
string $database
- $type
string $type
- $port
integer $port
Returns
Throws
|
abstract public
|
#
__construct( mixed $host, mixed $username, mixed $password, mixed $database, mixed $port )
|
abstract public
|
#
setCharset( string $charset )
Set the charset used to communicate with the database
Set the charset used to communicate with the database
Parameters
|
abstract public
|
#
select( string $database )
select the given database
select the given database
Parameters
- $database
string $database
|
abstract public
string
|
#
quote( string $string )
Escape and add quotes around the given string
Escape and add quotes around the given string
Parameters
Returns
string
|
abstract public
ManiaLive\Database\RecordSet
|
#
execute( string $query )
Execute a query and return the result
Execute a query and return the result
Parameters
Returns
|
abstract 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
|
abstract public
integer
|
#
insertID( )
Return the id of the last insert query
Return the id of the last insert query
Returns
integer
|
abstract 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
|
abstract public
|
#
disconnect( )
Close the current connection to the database
Close the current connection to the database
|
abstract public
string
|
#
getDatabase( )
Get the selected database
Get the selected database
Returns
string
|
abstract public
boolean
|
#
tableExists( string $table )
Check if the given table exists
Check if the given table exists
Parameters
Returns
boolean
|
abstract public
resource
|
#
getHandle( )
Return the current Connection Link
Return the current Connection Link
Returns
resource
|
public static
|
|
public static
|
|
public static
|
|