v5:database:pdo_new
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:database:pdo_new [2022/03/20 18:25] – mnewnham | v5:database:pdo_new [2023/01/24 04:00] (current) – mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PDO ====== | + | ====== PDO (new) ====== |
+ | <WRAP important> | ||
+ | This is still [[https:// | ||
+ | Feedback is welcome, just add your comments in the pull request. | ||
+ | </ | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 14: | Line 19: | ||
===== Description ===== | ===== Description ===== | ||
- | This driver supports connections using the standardized [[http:// | + | This driver supports connections using the standardized [[http:// |
Except for the '' | Except for the '' | ||
+ | ------------------------------------------------------- | ||
+ | ===== Quick Upgrade Notes ==== | ||
+ | <WRAP info> | ||
+ | * Instead of '' | ||
+ | * Passing a DSN statement to '' | ||
+ | * Do not start the DSN statement with the driver name | ||
+ | |||
+ | </ | ||
------------------------------------------------------------- | ------------------------------------------------------------- | ||
====Supported drivers==== | ====Supported drivers==== | ||
Line 22: | Line 35: | ||
^PHP Driver^Description^ADOdb Connector^ | ^PHP Driver^Description^ADOdb Connector^ | ||
|pdo_firebird|Firebird|firebird| | |pdo_firebird|Firebird|firebird| | ||
- | |pdo_ibm|IBM DB2|db2| | + | |pdo_ibm|IBM DB2|ibm| |
|pdo_informix|IBM Informix|informix| | |pdo_informix|IBM Informix|informix| | ||
|pdo_mysql|MySQL|mysql| | |pdo_mysql|MySQL|mysql| | ||
|pdo_oci|Oracle|oci| | |pdo_oci|Oracle|oci| | ||
- | |pdo_odbc|Generic ODBC|odbc | + | |pdo_odbc|Generic ODBC|odbc| |
|pdo_pgsql|Postgresql|pgsql| | |pdo_pgsql|Postgresql|pgsql| | ||
|pdo_sqlite|SQLite|sqlite| | |pdo_sqlite|SQLite|sqlite| | ||
- | |pdo_sqlsrv|SQL Server | + | |pdo_sqlsrv|Microsoft |
====Unsupported Drivers==== | ====Unsupported Drivers==== | ||
Line 115: | Line 128: | ||
[[v5: | [[v5: | ||
</ | </ | ||
+ | |||
+ | * This driver requires the installation of the IBM DB2 client | ||
+ | * See the [[v5: | ||
------------------------------------------------------- | ------------------------------------------------------- | ||
Line 122: | Line 138: | ||
$db = ADOnewConnection(' | $db = ADOnewConnection(' | ||
- | $dsn = ' | + | $dsn = ' |
+ | $dsn.= 'database=SAMPLE; | ||
$user = ''; | $user = ''; | ||
$password = '' | $password = '' | ||
Line 134: | Line 151: | ||
**pdo_informix** | **pdo_informix** | ||
</ | </ | ||
+ | |||
* There is no native mode driver for IBM Informix Connections | * There is no native mode driver for IBM Informix Connections | ||
+ | * This driver requires the installation of the IBM Informix Client | ||
+ | * Supports Informix Databases version 12+ | ||
------------------------------------------------------- | ------------------------------------------------------- | ||
Line 141: | Line 160: | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $db = ADOnewConnection(' | + | $db = ADOnewConnection(' |
- | $dsn = ' | + | $dsn = ' |
- | $user = ''; | + | $dsn.= ' |
- | $password = '' | + | $user = 'ix-user'; |
+ | $password = 'ix-password' | ||
$db-> | $db-> | ||
</ | </ | ||
------------------------------------------ | ------------------------------------------ | ||
- | ==== pdo_mysql | + | ==== MySQL ==== |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | **pdo_mysql** | ||
== Preferred Driver == | == Preferred Driver == | ||
[[v5: | [[v5: | ||
- | == Specification == | ||
- | ^Driver Name|pdo| | ||
- | ^Data Provider|pdo| | ||
- | ^Status|Active((This driver is supported by ADOdb project members))| | ||
- | ^Windows|Yes| | ||
- | ^Unix|Yes| | ||
- | ^ADOdb V5|Yes| | ||
- | ^ADOdb V6|Yes| | ||
</ | </ | ||
Line 177: | Line 191: | ||
</ | </ | ||
---------------------------------------------- | ---------------------------------------------- | ||
- | ==== pdo_oci | + | ==== ODBC==== |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | **pdo_odbc** | ||
+ | </ | ||
+ | * This is a simple driver for connection to any ODBC compliant database. | ||
+ | * It is useful for reading and simple writes to data sources such as Microsoft Access, Excel and Google Sheets | ||
+ | * There is no support for Data Dictionary functions or database specific items such as sequences. | ||
+ | |||
+ | ------------------------------------------------------- | ||
+ | === Sample Connection String === | ||
+ | <code php> | ||
+ | include ' | ||
+ | $db = ADOnewConnection(' | ||
+ | |||
+ | /* | ||
+ | * Points directly at the DSN configuration in Windows Control Panel | ||
+ | */ | ||
+ | $dsn = ' | ||
+ | |||
+ | $db-> | ||
+ | </ | ||
+ | ---------------------------------------------- | ||
+ | ==== Oracle ==== | ||
+ | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | **pdo_oci** | ||
== Preferred Driver == | == Preferred Driver == | ||
[[v5: | [[v5: | ||
- | == Specification == | + | |
- | ^Driver Name|pdo| | + | |
- | ^Data Provider|pdo| | + | |
- | ^Status|Active((This driver is supported by ADOdb project members))| | + | |
- | ^Windows|Yes| | + | |
- | ^Unix|Yes| | + | |
- | ^ADOdb V5|Yes| | + | |
- | ^ADOdb V6|Yes| | + | |
</ | </ | ||
- | === Limitations === | ||
* There is no support for the complex binding features available in the Native Driver | * There is no support for the complex binding features available in the Native Driver | ||
+ | * This driver requires installation of an Oracle client, such as InstantClient | ||
---------------------------------------- | ---------------------------------------- | ||
Line 198: | Line 230: | ||
If you are using the instantclient, | If you are using the instantclient, | ||
<code php> | <code php> | ||
+ | $db = newAdoConnection(' | ||
// | // | ||
Line 215: | Line 248: | ||
</ | </ | ||
------------------------------------------ | ------------------------------------------ | ||
- | ==== pdo_pgsql | + | ==== Postgres |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | pdo_pgsql | ||
== Preferred Driver == | == Preferred Driver == | ||
[[v5: | [[v5: | ||
- | == Specification == | ||
- | ^Driver Name|pdo| | ||
- | ^Data Provider|pdo| | ||
- | ^Status|Active((This driver is supported by ADOdb project members))| | ||
- | ^Windows|Yes| | ||
- | ^Unix|Yes| | ||
- | ^ADOdb V5|Yes| | ||
- | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | === Status === | + | |
- | Some features are not supported | + | |
--------------------------------------------------------------- | --------------------------------------------------------------- | ||
=== Sample Connection String === | === Sample Connection String === | ||
Line 243: | Line 269: | ||
----------------------------------------------- | ----------------------------------------------- | ||
- | ==== pdo_sqlite | + | ==== SQLite |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | **pdo_sqlite** | ||
== Preferred Driver == | == Preferred Driver == | ||
[[v5: | [[v5: | ||
- | == Specification == | ||
- | ^Driver Name|pdo| | ||
- | ^Data Provider|pdo| | ||
- | ^Status|Active((This driver is supported by ADOdb project members))| | ||
- | ^Windows|Yes| | ||
- | ^Unix|No| | ||
- | ^ADOdb V5|Yes| | ||
- | ^ADOdb V6|Yes| | ||
</ | </ | ||
---------------------------------------------------------------- | ---------------------------------------------------------------- | ||
Line 260: | Line 280: | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $db = ADOnewConnection(' | + | $db = ADOnewConnection(' |
- | $dsn = 'sqlite:/ | + | $dsn = '/ |
$user = ' | $user = ' | ||
Line 270: | Line 290: | ||
------------------------------------------------- | ------------------------------------------------- | ||
- | ==== pdo_sqlsrv | + | ==== SQL Server |
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
+ | == PDO Name == | ||
+ | **pdo_sqlsrv** | ||
== Preferred Driver == | == Preferred Driver == | ||
[[v5: | [[v5: | ||
- | == Specification == | ||
- | ^Driver Name|pdo| | ||
- | ^Data Provider|pdo| | ||
- | ^Status|Active((This driver is supported by ADOdb project members))| | ||
- | ^Windows|Yes| | ||
- | ^Unix|Yes| | ||
- | ^ADOdb V5|Yes| | ||
- | ^ADOdb V6|Yes| | ||
- | |||
</ | </ | ||
* This driver requires the installation of the Microsoft native client library, as well as the [[https:// | * This driver requires the installation of the Microsoft native client library, as well as the [[https:// | ||
* Dates are always returned as strings | * Dates are always returned as strings | ||
- | * Most // | ||
- | * [[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 | * 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 298: | Line 308: | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $db = ADOnewConnection(' | + | $db = ADOnewConnection(' |
$user = ' | $user = ' | ||
$pass = ' | $pass = ' | ||
- | $dsn ='sqlsrv:server=SERVER\SQLEXPRESS; | + | $dsn =' |
$db-> | $db-> |
v5/database/pdo_new.1647797153.txt.gz · Last modified: 2022/03/20 18:25 by mnewnham