SqlConnection

php\sql\SqlConnection

abstract class

Constants


constant TRANSACTION_READ_UNCOMMITTED
constant TRANSACTION_READ_COMMITTED
constant TRANSACTION_REPEATABLE_READ
constant TRANSACTION_NONE
constant TRANSACTION_SERIALIZABLE

Properties


property autoCommit

bool

Disable this to use transaction mode.

property readOnly

bool

property transactionIsolation

int

See SqlConnection::TRANSACTION_* constants

property catalog

string

property schema

string

Methods


identifier($name)

throws php\sql\SqlException

Parameters:
  • $namestring
Returns:

string

query($sql, $arguments = null)
Parameters:
  • $sqlstring
  • $argumentsarray
Returns:

php\sql\SqlStatement

commit()

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.

throws php\sql\SqlException

rollback()

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.

throws php\sql\SqlException

close()

throws php\sql\SqlException

getCatalogs()
Returns:array
getSchemas()
Returns:array
getMetaData()
Returns:array