PDO :: prepare

Share this…Facebook0TwitterLinkedinPrint Post Views: 1,577 PDO::prepare — Prepares a statement for execution and returns a statement object Description 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 when the statement is […]


Share this…Facebook0TwitterLinkedinPrint Post Views: 1,897 PDO::lastInsertId — Returns the ID of the last inserted row or sequence value Description 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 […]

PDO :: inTransaction

Share this…Facebook0TwitterLinkedinPrint Post Views: 395 PDO::inTransaction — Checks if inside a transaction Description public bool PDO::inTransaction ( void ) Checks if a transaction is currently active within the driver. This method only works for database drivers that support transactions. Parameters This function has no parameters. Return Values Returns TRUE if a transaction is currently active, and FALSE if not. Share this…Facebook0TwitterLinkedinPrint

PDO :: getAvailableDrivers

Share this…Facebook0TwitterLinkedinPrint Post Views: 511 pdo_drivers PDO::getAvailableDrivers — pdo_drivers — Return an array of available PDO drivers Description 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 ofPDO::__construct(). Return Values PDO::getAvailableDrivers() returns an array of PDO driver names. If no drivers are available, it returns an empty array. Examples Example #1 A PDO::getAvailableDrivers() example <?php print_r(PDO::getAvailableDrivers()); […]

PDO :: getAttribute

Share this…Facebook0TwitterLinkedinPrint Post Views: 418 PDO::getAttribute — Retrieve a database connection attribute Description public mixed PDO::getAttribute ( int $attribute ) This function returns the value of a database connection attribute. To retrieve PDOStatement attributes, refer toPDOStatement::getAttribute(). Note that some database/driver combinations may not support all of the database connection attributes. Parameters attribute One of the PDO::ATTR_* constants. The constants that apply to database connections are […]