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:42] – 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 117: | Line 130: | ||
* This driver requires the installation of the IBM DB2 client | * This driver requires the installation of the IBM DB2 client | ||
+ | * See the [[v5: | ||
------------------------------------------------------- | ------------------------------------------------------- | ||
Line 124: | Line 138: | ||
$db = ADOnewConnection(' | $db = ADOnewConnection(' | ||
- | $dsn = ' | + | $dsn = ' |
$dsn.= ' | $dsn.= ' | ||
$user = ''; | $user = ''; | ||
Line 140: | Line 154: | ||
* 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 | * This driver requires the installation of the IBM Informix Client | ||
+ | * Supports Informix Databases version 12+ | ||
------------------------------------------------------- | ------------------------------------------------------- | ||
Line 175: | Line 189: | ||
$db-> | $db-> | ||
+ | </ | ||
+ | ---------------------------------------------- | ||
+ | ==== ODBC==== | ||
+ | <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-> | ||
</ | </ | ||
---------------------------------------------- | ---------------------------------------------- | ||
Line 232: | 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 249: | Line 280: | ||
<code php> | <code php> | ||
include ' | include ' | ||
- | $db = ADOnewConnection(' | + | $db = ADOnewConnection(' |
- | $dsn = 'sqlite:/ | + | $dsn = '/ |
$user = ' | $user = ' | ||
Line 259: | 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 287: | 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.1647798171.txt.gz · Last modified: 2022/03/20 18:42 by mnewnham