PDO::lastInsertId

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Returns the ID of the last inserted row or sequence value public string PDO::lastInsertId ([ string $name = NULL ] ) Returns the ID of the last inserted row, or the last value from a sequence object, depending on the underlying driver. For example, PDO_PGSQL requires you to specify the name of a sequence object for the name parameter. Note: This method may not return a

PDO::getAvailableDrivers

(PHP 5 >= 5.1.3, PHP 7, PECL pdo >= 1.0.3) Return an array of available PDO drivers public static array PDO::getAvailableDrivers ( void ) array pdo_drivers ( void ) This function returns all currently available PDO drivers which can be used in DSN parameter of PDO::__construct(). Returns: PDO::getAvailableDrivers() returns an array of PDO driver names. If no drivers are available, it retu

PDO::getAttribute

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) Retrieve a database connection attribute public mixed PDO::getAttribute ( int $attribute ) This function returns the value of a database connection attribute. To retrieve PDOStatement attributes, refer to PDOStatement::getAttribute(). Note that some database/driver combinations may not support all of the database connection attributes. Parameters:

PDO::prepare

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Prepares a statement for execution and returns a statement object public PDOStatement PDO::prepare ( string $statement [, array $driver_options = array() ] ) Prepares an SQL statement to be executed by the PDOStatement::execute() method. The SQL statement can contain zero or more named (:name) or question mark (?) parameter markers for which real values will be substituted

PDO::query

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.2.0) Executes an SQL statement, returning a result set as a PDOStatement object public PDOStatement PDO::query ( string $statement ) public PDOStatement PDO::query ( string $statement , int $PDO::FETCH_COLUMN , int $colno ) public PDOStatement PDO::query ( string $statement , int $PDO::FETCH_CLASS , string $classname , array $ctorargs ) public PDOStatement PDO::query ( string $

PDO::__construct

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Creates a PDO instance representing a connection to a database public PDO::__construct ( string $dsn [, string $username [, string $password [, array $options ]]] ) Creates a PDO instance to represent a connection to the requested database. Parameters: dsn The Data Source Name, or DSN, contains the information required to connect to the d

PDO::exec

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Execute an SQL statement and return the number of affected rows public int PDO::exec ( string $statement ) PDO::exec() executes an SQL statement in a single function call, returning the number of rows affected by the statement. PDO::exec() does not return results from a SELECT statement. For a SELECT statement that you only need to issue once during your program, consider

PDO::errorCode

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Fetch the SQLSTATE associated with the last operation on the database handle public mixed PDO::errorCode ( void ) Returns: Returns an SQLSTATE, a five characters alphanumeric identifier defined in the ANSI SQL-92 standard. Briefly, an SQLSTATE consists of a two characters class value followed by a three characters subclass value. A class value of 01

PDO::errorInfo

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Fetch extended error information associated with the last operation on the database handle public array PDO::errorInfo ( void ) Returns: PDO::errorInfo() returns an array of error information about the last operation performed by this database handle. The array consists of the following fields: Element Information 0 SQLSTATE error code (a five char

PDO::commit

(PHP 5 >= 5.1.0, PHP 7, PECL pdo >= 0.1.0) Commits a transaction public bool PDO::commit ( void ) Commits a transaction, returning the database connection to autocommit mode until the next call to PDO::beginTransaction() starts a new transaction. Returns: Returns TRUE on success or FALSE on failure. Examples: Committing a basic