v5:database:oracle
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
v5:database:oracle [2018/07/11 01:13] – [oci8quercus] mnewnham | v5:database:oracle [2023/01/25 04:40] (current) – [Auto-Increment Column] mnewnham | ||
---|---|---|---|
Line 13: | Line 13: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
== Alternatives == | == Alternatives == | ||
- | **Alternative Drivers**\\ | + | [[v5: |
- | [[v5: | + | == See Also == |
- | [[v5:database:ado|ADO driver for Oracle]] | + | [[v5:reference:connection: |
</ | </ | ||
Line 31: | Line 31: | ||
| [[v5: | | [[v5: | ||
| [[v5: | | [[v5: | ||
- | {{tag> | + | {{tag> |
==== Connection Examples ==== | ==== Connection Examples ==== | ||
Line 89: | Line 89: | ||
| | ||
The default value for '' | The default value for '' | ||
+ | ---------------------------------- | ||
==== Auto-Increment Column ==== | ==== Auto-Increment Column ==== | ||
[[v5: | [[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> | ||
+ | |||
+ | $db-> | ||
+ | |||
+ | $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 104: | Line 135: | ||
^ADOdb V6|Yes| | ^ADOdb V6|Yes| | ||
</ | </ | ||
- | This driver extends the oci8 driver and mostly provides compatibility with MySQL databases which use the ? placeholder for bind params. If you are migrating code or writing portable code, consider using the [[v5: | + | This driver extends the oci8 driver and mostly provides compatibility with MySQL databases which use the ? placeholder for bind params. |
+ | |||
+ | 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 119: | Line 155: | ||
</ | </ | ||
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> | ||
v5/database/oracle.1531264389.txt.gz · Last modified: 2018/07/11 01:13 by mnewnham