ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:database:pdo_new

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
v5:database:pdo_new [2022/03/20 19:47] mnewnhamv5:database:pdo_new [2022/04/03 12:26] – Modify title, add work-in-progress comment dregad
Line 1: Line 1:
-====== PDO ======+====== PDO (new) ====== 
 +<WRAP important> 
 +This is still [[https://github.com/ADOdb/ADOdb/pull/826|under development]].  
 +Feedback is welcome, just add your comments in the pull request. 
 +</WRAP> 
 ~~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://php.net/manual/en/book.pdo.php|PHP Data Objects]].This page refers to ADOdb release 5.23.0 and higher. For previous versions of ADOdb, see the [[v5:database:pdo_old|Previous Version Of This Page]].+This driver supports connections using the standardized [[http://php.net/manual/en/book.pdo.php|PHP Data Objects]].This page refers to ADOdb release 5.23.0 and higher. For previous versions of ADOdb, see the [[v5:database:pdo|Previous Version Of This Page]].
  
 Except for the ''pdo_odbc'' driver, all PDO drivers include support for full data dictionary functions (e.g. ''createTableSql()'',''addIndexSql()'', etc.) Except for the ''pdo_odbc'' driver, all PDO drivers include support for full data dictionary functions (e.g. ''createTableSql()'',''addIndexSql()'', etc.)
 +-------------------------------------------------------
 +===== Quick Upgrade Notes ====
 +<WRAP info>
 +  * Instead of ''newAdoConnection('pdo')'', use ''newAdoConnection('pdo\driver')''
 +  * Passing a DSN statement to ''newAdoConnection()'' is no longer supported
 +  * Do not start the DSN statement with the driver name
 +
 +</WRAP>
 ------------------------------------------------------------- -------------------------------------------------------------
 ====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 using Windows Native Client|sqlsrv|+|pdo_sqlsrv|Microsoft SQL Server|sqlsrv|
  
 ====Unsupported Drivers==== ====Unsupported Drivers====
Line 140: Line 153:
   * 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 182: Line 195:
 **pdo_odbc** **pdo_odbc**
 </WRAP> </WRAP>
 +  * 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. 
  
-This is a simple driver for connection to any ODBC compliant database. There is no support for Data Dictionary functions or database specific items such as sequences.  
 ------------------------------------------------------- -------------------------------------------------------
 === Sample Connection String === === Sample Connection String ===
Line 190: Line 205:
 $db   = ADOnewConnection('pdo\odbc'); $db   = ADOnewConnection('pdo\odbc');
  
-$dsn  = 'hostname=127.0.0.1;database=employees;' +/* 
-$user = 'user'; +* Points directly at the DSN configuration in Windows Control Panel 
-$password = 'password'+*/ 
 +$dsn  = 'MYDSN'
  
-$db->connect($dsn,$user,$password);+$db->connect($dsn);
 </code> </code>
 ---------------------------------------------- ----------------------------------------------
v5/database/pdo_new.txt · Last modified: 2023/01/24 04:00 by mnewnham