Overview

Namespaces

  • webfilesframework
    • codegeneration
      • general
      • php
    • core
      • datastore
        • functions
          • filter
          • sorting
        • types
          • database
            • resultHandler
          • directory
          • googlecalendar
          • mail
          • remote
      • datasystem
        • database
        • file
          • format
            • media
              • image
                • handler
          • system
            • dropbox
      • datatypes
        • time
      • time
    • io
      • form
        • formItem
        • validation
        • webfile
      • request

Classes

  • MDatabaseConnection
  • MDatabaseDatatypes
  • MDatabaseTable
  • MDatabaseTableColumn
  • Overview
  • Namespace
  • Class

Class MDatabaseConnection

description

Namespace: webfilesframework\core\datasystem\database
Author: Sebastian Monzel < mail@sebastianmonzel.de >
Since: 0.1.7
Located at core/datasystem/database/MDatabaseConnection.php
Methods summary
public
# __construct( string $host = null, string $database = null, string $tablePrefix = null, string $username = null, string $password = null )

Parameters

$host
the host to connect to.
$database
the database to connect to.
$tablePrefix
the table prefix used for the actual connection to the database.
$username
the username for the connection.
$password
the password for the connection.
public static object
# getInstance( String $instanceName )

multiton to administrate the instances of the connection and global accessing

multiton to administrate the instances of the connection and global accessing

Parameters

$instanceName

Returns

object
public
# connect( )

connects to the database server

connects to the database server

public
# close( )

closes the connection

closes the connection

public boolean|mysqli_result
# query( $sqlCommand )

queries the database with the specified sql command

queries the database with the specified sql command

Parameters

$sqlCommand

Returns

boolean|mysqli_result

Throws

webfilesframework\MWebfilesFrameworkException
public webfilesframework\core\datastore\types\database\resultHandler\MIResultHandler
# queryAndHandle( $sqlCommand )

Parameters

$sqlCommand

Returns

webfilesframework\core\datastore\types\database\resultHandler\MIResultHandler

Throws

webfilesframework\MWebfilesFrameworkException
public
# getError( )

prints last error of the connection

prints last error of the connection

public integer
# getInsertId( )

returns id of a last insert query

returns id of a last insert query

Returns

integer
public String
# getHost( )

returns the hostname of the databaseserver

returns the hostname of the databaseserver

Returns

String
public String
# getUsername( )

returns the name of the user connected to the database server

returns the name of the user connected to the database server

Returns

String
public null|string
# getPassword( )

Returns

null|string
public null|string
# getDatabaseName( )

Returns

null|string
public
# setDatabaseName( $databaseName )

Sets the database for the given connection

Sets the database for the given connection

Parameters

$databaseName
public
# getTablePrefix( )

Returns the table prefix used for the given connection.

Returns the table prefix used for the given connection.

API documentation generated by ApiGen