\PDO

Synopsis

class PDO {
}

Methods

public

  • __construct() — Creates a PDO instance representing a connection to a database
  • beginTransaction() — Initiates a transaction
  • commit() — Commits a transaction
  • errorCode() — Fetch the SQLSTATE associated with the last operation on the database handle
  • errorInfo() — Fetch extended error information associated with the last operation on the database handle
  • exec() — Execute an SQL statement and return the number of affected rows
  • getAttribute() — Retrieve a database connection attribute
  • getAvailableDrivers() — Return an array of available PDO drivers
  • inTransaction() — Checks if inside a transaction
  • lastInsertId() — Returns the ID of the last inserted row or sequence value
  • prepare() — Prepares a statement for execution and returns a statement object
  • query() — Executes an SQL statement, returning a result set as a PDOStatement object
  • quote() — Quotes a string for use in a query.
  • rollBack() — Rolls back a transaction
  • setAttribute() — Set an attribute