v5:reference:connection:adonewconnection
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:reference:connection:adonewconnection [2017/04/14 10:22] – [Table] fix table layout dregad | v5:reference:connection:adonewconnection [2020/12/08 10:39] (current) – better use PHP string concatenation for example instead of javascript's ;-) peterdd | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| <WRAP right box> | <WRAP right box> | ||
| == Syntax == | == Syntax == | ||
| - | | + | |
| mixed adoNewConnection( | mixed adoNewConnection( | ||
| optional string $driverType='' | optional string $driverType='' | ||
| ) | ) | ||
| - | + | ||
| </ | </ | ||
| ===== Description ===== | ===== Description ===== | ||
| Line 27: | Line 27: | ||
| include ' | include ' | ||
| /* | /* | ||
| - | * Simple connection | + | * Simple connection |
| - | */ | + | */ |
| $driver = ' | $driver = ' | ||
| $db = adoNewConnection($driver); | $db = adoNewConnection($driver); | ||
| /* | /* | ||
| - | * Now connect to the database | + | * Now connect to the database |
| - | */ | + | */ |
| $db-> | $db-> | ||
| </ | </ | ||
| Line 40: | Line 40: | ||
| include ' | include ' | ||
| /* | /* | ||
| - | * Set DSN | + | * Set DSN |
| - | */ | + | */ |
| $driver = ' | $driver = ' | ||
| $DSN = " | $DSN = " | ||
| - | $db = adoNewConnection($driver | + | $db = adoNewConnection($driver |
| /* | /* | ||
| - | * Now connected | + | * Now connected |
| - | */ | + | */ |
| </ | </ | ||
| ===== Additional Parameters To DSN connection ==== | ===== Additional Parameters To DSN connection ==== | ||
| The following additional parameter can be added to the DSN connection string. Some of the parameters only work with specific drivers. | The following additional parameter can be added to the DSN connection string. Some of the parameters only work with specific drivers. | ||
| - | ^ Code ^ Value ^ Parameter | + | ^ Code ^ Driver |
| - | | new | true | + | | new | |
| - | | persist | + | | persist |
| - | | persistent | + | | persistent |
| - | | debug | true | + | | debug | |
| - | | role | string | + | | port |
| - | | dialect | + | | socket |
| - | | charset | + | | nls_date_format |
| - | | buffers | + | | cachesecs |
| - | | fetchmode | + | | memCache |
| - | | charpage | + | | memCacheHost |
| - | | clientflags | + | | memCachePort |
| - | | port | int | + | | memCacheCompress |
| - | | socket | + | |
| - | | nls_date_format | + | |
| - | | cachesecs | + | |
| - | | memcache | + | |
| ===== Error Codes ===== | ===== Error Codes ===== | ||
| Note that, because no connection object is available, the codes cannot be retrieved via [[v5: | Note that, because no connection object is available, the codes cannot be retrieved via [[v5: | ||
| + | |||
v5/reference/connection/adonewconnection.1492158158.txt.gz · Last modified: (external edit)
