ADOdb

Database Abstraction Layer for PHP

User Tools

Site Tools


v5:reference:connection:adonewconnection

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
v5:reference:connection:adonewconnection [2020/01/11 22:47] – [Table] mnewnhamv5:reference:connection:adonewconnection [2020/12/08 10:39] (current) – better use PHP string concatenation for example instead of javascript's ;-) peterdd
Line 44: Line 44:
 $driver = 'mysqli'; $driver = 'mysqli';
 $DSN    = "user:password@localhost/employees"; $DSN    = "user:password@localhost/employees";
-$db     = adoNewConnection($driver '://' $DSN);+$db     = adoNewConnection($driver '://' $DSN);
 /* /*
 * Now connected * Now connected
Line 52: Line 52:
 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              ^ Driver             ^ Value    ^ Parameter                                                ^ Description                                                                                     +^ Code              ^ Driver             ^ Value                                      ^ Parameter                                        ^ Description                                                          
-| new                                  | true     | [[v5:reference:connection:nconnect|nConnect()]]          | Forces a new connection                                                                         +| new                                  | true                                       | [[v5:reference:connection:nconnect|nConnect()]]  | Forces a new connection                                              
-| persist                              | true     | [[v5:reference:connection:pconnect|pConnect()]]          | Creates a persistent connection                                                                 +| persist                              | true                                       | [[v5:reference:connection:pconnect|pConnect()]]  | Creates a persistent connection                                      
-| persistent        |                    | true     | [[v5:reference:connection:pconnect|pConnect()]]          | Creates a persistent connection                                                                 +| persistent        |                    | true                                       | [[v5:reference:connection:pconnect|pConnect()]]  | Creates a persistent connection                                      
-| debug                                | true     | [[v5:userguide:debug|debug]]                             | Enables debug mode                                                                              | +| debug                                | true| [[v5:userguide:debug|debug]]                                                            | Enables debug mode                                                   
-| role              | ibase              | string                                                             || When using the ibase driver, allows setting a role                                              | +| port              | mysqli, postgres9  | int                                                                                         | Sets the connection port                                             
-| dialect           | ibase              | integer                                                            || Undocumented option                                                                             | +| socket            | mysqli             | string |                    | Sets the connection socket | 
-| charset           | ibase              | string   | [[v5:reference:connection:setcharset|setCharSet()]]      | Sets a character set (obsolete, replaced by [[v5:reference:connection:setConnectionParameter]] +| nls_date_format   | oci8               | string |                    | Set date format            
-| buffers           | ibase              | string                                                             || Undocumented option                                                                             | +| cachesecs                            | int                                                                                         | Sets the number of cache seconds                                     
-| fetchmode         | ibase              | int      | [[v5:reference:connection:setfetchmode|setFetchMode()]]  | Sets the fetch mode                                                                             | +| memCache          |                    | false |[[v5:userguide:memcached|memcache]]                                                    | Enables memcache library for caching                                 
-| charpage          | ado                | string                                                             || Undocumented option                                                                             | +| memCacheHost      |                    | array |[[v5:userguide:memcached|memcache]]                                                    | Array of one or more memcached servers                               
-| clientflags       | mysqli             | string                                                             || Undocumented option                                                                             +| memCachePort      |                    | int   |[[v5:userguide:memcached|memcache]]                                                      | Optional alternative port to connect to memcache server(s)           
-| port              | mysqli, postgres9  | int                                                                || Sets the connection port                                                                        +| memCacheCompress  |                    | false |[[v5:userguide:memcached|memcache]]                                                    | Enables memcache compression (not supported with memcached library)  |
-| socket            | mysqli             | string                                                             || Sets the connection socket                                                                      +
-| nls_date_format   | oci8               | string                                                             || Set date format                                                                                 +
-| cachesecs                            | int                                                                || Sets the number of cache seconds                                                                +
-| memCache          |                    | false    | [[v5:userguide:memcached|memcache]]                      | Enables memcache library for caching                                                            +
-| memCacheHost      |                    | array    | [[v5:userguide:memcached|memcache]]                      | Array of one or more memcached servers                                                          +
-| memCachePort      |                    | int      | [[v5:userguide:memcached|memcache]]                      | Optional alternative port to connect to memcache server(s)                                      +
-| memCacheCompress  |                    | false    | [[v5:userguide:memcached|memcache]]                      | Enables memcache compression (not supported with memcached library)                             |+
  
 ===== Error Codes ===== ===== Error Codes =====
v5/reference/connection/adonewconnection.1578779273.txt.gz · Last modified: 2020/01/11 22:47 by mnewnham