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/01/06 04:22] – mnewnham | v5:database:pdo [2019/12/28 19:35] – [Preferred Drivers] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PDO ====== | ====== PDO ====== | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | <WRAP right box> | ||
- | == See Also == | ||
- | [[http:// | ||
- | </ | ||
===== Description ===== | ===== Description ===== | ||
This driver supports connections using the standardized [[http:// | This driver supports connections using the standardized [[http:// | ||
Line 25: | Line 21: | ||
$user = ' | $user = ' | ||
$password = ' | $password = ' | ||
- | $dsnString= ' | + | $dsnString= ' |
$db-> | $db-> | ||
Line 34: | Line 30: | ||
===== 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, | ||
===== The PDO setAttribute function ===== | ===== The PDO setAttribute function ===== | ||
As of ADOdb 5.21, the PDO:: | As of ADOdb 5.21, the PDO:: | ||
Line 92: | Line 92: | ||
^Driver Name|pdo| | ^Driver Name|pdo| | ||
^Data Provider|pdo| | ^Data Provider|pdo| | ||
- | ^Status|Inactive((This driver is not supported by ADOdb project members, but you can contribute to this driver if you have the expertise))| | + | ^Status|Active((This driver is supported by ADOdb project members))| |
^Windows|Yes| | ^Windows|Yes| | ||
- | ^Unix|No| | + | ^Unix|Yes| |
^ADOdb V5|Yes| | ^ADOdb V5|Yes| | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | The current status of this driver | + | == Limitations == |
+ | |||
+ | |||
+ | * There is no support for the complex binding features available in the Native Driver | ||
+ | * Some MetaFunctions are unavailable | ||
+ | |||
+ | ---------------------------------------- | ||
+ | === Sample Connection String === | ||
+ | If you are using the instantclient, | ||
+ | <code php> | ||
+ | |||
+ | // | ||
+ | $tns = " | ||
+ | (DESCRIPTION = | ||
+ | (ADDRESS_LIST = | ||
+ | (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.86.86)(PORT = 1521)) | ||
+ | ) | ||
+ | (CONNECT_DATA = | ||
+ | (SERVICE_NAME = XEPDB1) | ||
+ | ) | ||
+ | ) | ||
+ | "; | ||
+ | $dsnString=" | ||
+ | $db-> | ||
+ | |||
+ | </ | ||
------------------------------------------ | ------------------------------------------ | ||
==== pdo_pgsql ==== | ==== pdo_pgsql ==== | ||
Line 173: | Line 198: | ||
* Dates are always returned as strings | * Dates are always returned as strings | ||
* Most // | * Most // | ||
- | * [[v5: | + | * [[v5: |
* 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 | ||
+ | * No support for parameter binding | ||
---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
v5/database/pdo.txt · Last modified: 2022/02/20 23:47 by mnewnham