v5:database:oracle
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
database:oracle [2015/12/27 15:37] – mnewnham | v5:database:oracle [2023/01/25 04:37] – [Auto-Increment Column] mnewnham | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Oracle ===== | ====== Oracle ===== | ||
~~NOTOC~~ | ~~NOTOC~~ | ||
- | For more information on using advanced functionality in the Oracle driver, read the [[userguide: | + | For more information on using advanced functionality in the Oracle driver, read the [[v5:userguide: |
====== oci8 ====== | ====== oci8 ====== | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 13: | Line 13: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
== Alternatives == | == Alternatives == | ||
- | **Alternative Drivers**\\ | + | [[v5:database: |
- | [[database: | + | == See Also == |
- | [[database:ado|ADO driver for Oracle]] | + | [[v5:reference: |
</ | </ | ||
** This is the preferred driver for connecting to Oracle databases ** | ** This is the preferred driver for connecting to Oracle databases ** | ||
Despite its name, this driver supports Oracle databases up to and including Oracle 11. | Despite its name, this driver supports Oracle databases up to and including Oracle 11. | ||
+ | |||
+ | This is currently the only supported driver when using PHP 7 | ||
--------------------------------------- | --------------------------------------- | ||
===== Driver Specific Methods ===== | ===== Driver Specific Methods ===== | ||
Line 27: | Line 29: | ||
The following **non-portable** methods are available to this driver | The following **non-portable** methods are available to this driver | ||
^ Method | ^ Method | ||
- | | [[reference: | + | | [[v5:database: |
- | | [[reference:oracle:ExecuteCursor|executeCursor()]] | + | | [[v5:database:oracle:executecursor|executeCursor()]] |
- | {{tag> | + | {{tag> |
==== Connection Examples ==== | ==== Connection Examples ==== | ||
Line 70: | Line 72: | ||
$dsn = ' | $dsn = ' | ||
- | $conn = ADONewConnection($dsn); | + | $conn = ADONewConnection($dsn); |
$dsn = ' | $dsn = ' | ||
Line 78: | Line 80: | ||
$conn = ADONewConnection($dsn); | $conn = ADONewConnection($dsn); | ||
- | With ADOdb data source names, there is no need to call ``connect()`` or ``PConnect()``. | + | With ADOdb data source names, there is no need to call '' |
--------------------------------- | --------------------------------- | ||
+ | ==== Date Format ==== | ||
+ | By default, after connection the following SQL is issued: | ||
+ | |||
+ | "ALTER SESSION SET NLS_DATE_FORMAT='" | ||
+ | | ||
+ | The default value for '' | ||
+ | ---------------------------------- | ||
+ | ==== Auto-Increment Column ==== | ||
+ | [[v5: | ||
+ | |||
+ | If you have long table names then the generated trigger name can exceed the maximum allowed length. To prevent this, use the class variable '' | ||
+ | === Example using the table name " | ||
+ | By default, the trigger name would be SEQ_CUSTOMER_DELIVERY_ADDRESS which exceeds the 16 character name for sequences. By setting '' | ||
+ | |||
+ | === Accessing the trigger in your code === | ||
+ | <code php> | ||
+ | |||
+ | $tab = ' | ||
+ | $tab = sprintf(' | ||
+ | |||
+ | print $tab; //prints SEQ_401703491 | ||
+ | |||
+ | </ | ||
+ | |||
+ | ----------------------------------- | ||
+ | ==== Session Mode ==== | ||
+ | |||
+ | From ADOdb **V5.23.0**, | ||
+ | |||
+ | <code php> | ||
+ | |||
+ | $db = ADONewConnection(' | ||
+ | $db-> | ||
+ | $db-> | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---------------------------------------------- | ||
====== oci8po ====== | ====== oci8po ====== | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 92: | Line 133: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | This driver extends the oci8 driver and provides compatibility with other database drivers such as MySQL and SQL Server. Use this version of the driver if you are writing portable code. | + | This driver extends the oci8 driver and mostly |
+ | |||
+ | If you are migrating code or writing portable code, consider using the [[v5: | ||
+ | |||
+ | A second difference to this driver is that it does not create a sequence to emulate auto-increment fields. You must provide the functionality yourself if you need it. | ||
{{tag> | {{tag> | ||
------------------------------------ | ------------------------------------ | ||
Line 107: | Line 153: | ||
</ | </ | ||
This driver provides an undocumented enhancement to the oci8 driver | This driver provides an undocumented enhancement to the oci8 driver | ||
+ | |||
+ | It adds a [[https:// | ||
+ | Note that // | ||
+ | |||
{{tag> | {{tag> | ||
Line 114: | Line 164: | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
== Specification == | == Specification == | ||
- | ^Driver Name|oci805cus| | + | ^Driver Name|oci8quercus| |
^Data Provider|oracle| | ^Data Provider|oracle| | ||
^Status|Inactive((This driver is obsolete is not actively supported or enhanced by ADOdb project members, but you can provide fixes and enhancements if you have the expertise))| | ^Status|Inactive((This driver is obsolete is not actively supported or enhanced by ADOdb project members, but you can provide fixes and enhancements if you have the expertise))| | ||
Line 122: | Line 172: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | This driver provides an undocumented enhancement to the oci8 driver | + | This driver provides an undocumented enhancement to the oci8 driver. The differences in the driver relate solely to the use of cursors in stored procedures. This may be related to information in the function [[v5: |
{{tag> | {{tag> | ||
Line 129: | Line 179: | ||
====== oracle ====== | ====== oracle ====== | ||
<WRAP info> | <WRAP info> | ||
- | Support for oracle databases versions 7 and lower was removed in PHP version 5.1. In ADOdb version 6, the Oracle driver will be removed | + | Support for oracle databases versions 7 and lower was removed in PHP version 5.1. In ADOdb version 6, the Oracle driver will be removed |
</ | </ | ||
<WRAP right box round 300px> | <WRAP right box round 300px> | ||
Line 141: | Line 191: | ||
^ADOdb V6|No| | ^ADOdb V6|No| | ||
</ | </ | ||
- | This driver provided support to oracle 7 and lower databases. The driver is obsolete, and not supported by PHP and will be removed in ADOdb version 6.0 The data provider name ' | + | This driver provided support to oracle 7 and lower databases. The driver is obsolete, and not supported by PHP and will be removed in ADOdb version 6.0. |
v5/database/oracle.txt · Last modified: 2023/01/25 04:40 by mnewnham