Skip to content

icms_db_IConnection

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_db_IConnection

Interface for database adapters.

All the methods in this class are PDO methods, with the exception of escape, which is a legacy method

  • Interface name: icms_db_IConnection
  • Namespace:
  • This is an interface

Methods

setAttribute

bool icms_db_IConnection::setAttribute(int attribute, mixed value)

Set the value of a database connection attribute.

  • Visibility: public

Arguments

  • attribute int
  • value mixed

getAttribute

mixed icms_db_IConnection::getAttribute(int attribute)

Return the value of a database connection attribute.

  • Visibility: public

Arguments

  • attribute int

errorCode

mixed icms_db_IConnection::errorCode()

Last error as an SQLSTATE, a five characters alphanumeric identifier.

  • Visibility: public

errorInfo

array icms_db_IConnection::errorInfo()

Get an array of error information about the last operation.

  • Visibility: public

quote

string icms_db_IConnection::quote(string string, int type)

Places quotes around the input string and escapes special characters within the input string.

  • Visibility: public

Arguments

  • string string
  • type int

escape

mixed icms_db_IConnection::escape(mixed string)

Safely escape the string, but strips the outer quotes This is a legacy method

  • Visibility: public

Arguments

  • string mixed

beginTransaction

bool icms_db_IConnection::beginTransaction()

Turns off autocommit mode and starts recording transaction.

  • Visibility: public

commit

bool icms_db_IConnection::commit()

Commits current transaction.

  • Visibility: public

rollBack

bool icms_db_IConnection::rollBack()

Rolls back current transaction.

  • Visibility: public

prepare

\icms_db_Statement icms_db_IConnection::prepare(string sql, array options)

Prepares an SQL statement

  • Visibility: public

Arguments

  • sql string
  • options array

exec

int icms_db_IConnection::exec(string sql)

Executes an SQL statement and returns the number of affected rows.

  • Visibility: public

Arguments

  • sql string

query

\icms_db_Statement icms_db_IConnection::query(mixed statement, mixed fetch)

Executes an SQL statement and returns a result set as a IStatement object.

  • Visibility: public

Arguments

  • statement mixed
  • fetch mixed

lastInsertId

string icms_db_IConnection::lastInsertId(string name)

Returns the ID of the last inserted row or the last value from a sequence object.

  • Visibility: public

Arguments

  • name string
Clone this wiki locally