v5:database:pdo
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
v5:database:pdo [2019/12/28 02:20] – [pdo_sqlsrv] mnewnham | v5:database:pdo [2020/12/06 20:02] – [The PDO setAttribute function] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PDO ====== | ====== PDO ====== | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
+ | |||
===== Description ===== | ===== Description ===== | ||
This driver supports connections using the standardized [[http:// | This driver supports connections using the standardized [[http:// | ||
Line 30: | Line 31: | ||
===== Preferred Drivers ===== | ===== Preferred Drivers ===== | ||
- | In all cases, using native drivers (listed below) provide better functionality, | + | |
+ | Using ADOdb effectively eliminates the need to use the PHP PDO driver as it hides the PHP level command: | ||
+ | |||
+ | * It provides true database abstraction, | ||
+ | * In all cases, using native drivers (listed below) provide better functionality, | ||
+ | |||
+ | |||
+ | ===== Setting Construction Parameters ===== | ||
+ | Certain attributes need to be passed to the [[https:// | ||
+ | |||
+ | <code php> | ||
+ | $db = newAdoConnection(' | ||
+ | |||
+ | $db-> | ||
+ | \PDO:: | ||
+ | ]; | ||
+ | |||
+ | $dsnString= ' | ||
+ | $db-> | ||
+ | |||
+ | </ | ||
===== The PDO setAttribute function ===== | ===== The PDO setAttribute function ===== | ||
- | As of ADOdb 5.21, the PDO:: | + | For parameters that are set after the class is instantiated, The PDO:: |
===== Individual Driver Status ==== | ===== Individual Driver Status ==== | ||
----------------------- | ----------------------- | ||
Line 197: | Line 220: | ||
* This driver can also be used on Linux platforms, beginning with PHP Version 7. The program relies on the Microsoft drivers for Linux. For more information, | * This driver can also be used on Linux platforms, beginning with PHP Version 7. The program relies on the Microsoft drivers for Linux. For more information, | ||
* You cannot change the character set in the driver. This is a limitation of the PDO driver, not ADOdb | * You cannot change the character set in the driver. This is a limitation of the PDO driver, not ADOdb | ||
+ | * No support for parameter binding | ||
---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ||
Line 246: | Line 270: | ||
</ | </ | ||
+ | |||
+ | {{tag> | ||
+ |
v5/database/pdo.txt · Last modified: 2022/02/20 23:47 by mnewnham