Skip to content

SYSTEM DB ConnectionMYS

Ulf Gebhardt edited this page Jul 25, 2017 · 3 revisions

SYSTEM\DB\ConnectionMYS

MYSQL Connection Class provided by System to connect to MYSQL Database.

Properties

$connection

private mixed $connection = NULL

ressource Variable to store then open Connection

  • Visibility: private

Methods

__construct

mixed SYSTEM\DB\ConnectionAbstr::__construct(\SYSTEM\DB\DBINFO $dbinfo)

Connect to the DB upon Construction.

Arguments

  • $dbinfo SYSTEM\DB\DBINFO - <p>Database Information Object</p>

__destruct

mixed SYSTEM\DB\ConnectionAbstr::__destruct()

Destruct the Database Connection upon Destruction.

close

boolean SYSTEM\DB\ConnectionAbstr::close()

Close the Database Connection.

prepare

\SYSTEM\DB\Result SYSTEM\DB\ConnectionAbstr::prepare(string $stmtName, string $stmt, array $values, string $types)

Query the Connection using Prepare Statement

Arguments

  • $stmtName string - <p>Name of the Statement - espec for PostgreSQL important</p>
  • $stmt string - <p>SQL string of the Statement</p>
  • $values array - <p>Array of Prepare Values</p>
  • $types string - <p>types sql prepare string</p>

query

\SYSTEM\DB\Result SYSTEM\DB\ConnectionAbstr::query(string $query)

Query the Connection using normal Query Statement

Arguments

  • $query string - <p>SQL string of the Statement</p>

exec

\SYSTEM\DB\Result SYSTEM\DB\ConnectionAbstr::exec(string $query)

Exec Query on Database

Arguments

  • $query string - <p>SQL string of the Statement</p>

commit

boolean SYSTEM\DB\ConnectionAbstr::commit()

Commit a Transaction on the Database Connection

trans

boolean SYSTEM\DB\ConnectionAbstr::trans()

Open a Transaction on the Database Connection

getPrepareValueType

string SYSTEM\DB\ConnectionAbstr::getPrepareValueType(string $value)

Helperfunction to convert Prepared Values to SQL Type identifiers

Arguments

  • $value string - <p>Value to be examined regarding Type</p>
Clone this wiki locally