v5:reference:adodb_assoc_case
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| v5:reference:adodb_assoc_case [2019/05/08 13:26] – Example usage: use constants instead of values, simplify code and define $ADODB_FETCH_MODE dregad | v5:reference:adodb_assoc_case [2022/06/08 16:14] (current) – [Usage] fix code samples to reflect correct initialization of ADODB_ASSOC_CASE dregad | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| When returning data in **associative // | When returning data in **associative // | ||
| - | It must be declared **before** | + | It must be declared **before** |
| + | Being a constant, it is of course not possible to change its value later on. | ||
| Note that this setting has no effect on the casing of the actual data. | Note that this setting has no effect on the casing of the actual data. | ||
| + | |||
| + | <WRAP info> | ||
| + | Until ADOdb 5.20.14, the documentation contained several references to a global variable named '' | ||
| + | |||
| + | **As of 5.20.15, the only supported method to set fields case is the '' | ||
| + | </ | ||
| ===== Possible values ===== | ===== Possible values ===== | ||
| Line 13: | Line 20: | ||
| |ADODB_ASSOC_CASE_UPPER|1|uppercase field names| | |ADODB_ASSOC_CASE_UPPER|1|uppercase field names| | ||
| |ADODB_ASSOC_CASE_NATIVE (Default)|2|native-case field names| | |ADODB_ASSOC_CASE_NATIVE (Default)|2|native-case field names| | ||
| + | |||
| + | With the default behavior, '' | ||
| <WRAP tip> | <WRAP tip> | ||
| - | The default behavior, '' | + | When writing portable code, it is strongly recommended to choose |
| + | Relying on the native case default | ||
| </ | </ | ||
| ===== Usage ===== | ===== Usage ===== | ||
| <code php> | <code php> | ||
| - | define(' | ||
| require " | require " | ||
| + | define(' | ||
| $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | ||
| - | // $db Connection assumed | + | $db = ADONewConnection(' |
| + | $db-> | ||
| print_r($db-> | print_r($db-> | ||
| Line 40: | Line 51: | ||
| or: | or: | ||
| + | |||
| <code php> | <code php> | ||
| - | define(' | ||
| require " | require " | ||
| + | define(' | ||
| $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | ||
| - | // $db Connection assumed | + | $db = ADONewConnection(' |
| + | $db-> | ||
| print_r($db-> | print_r($db-> | ||
| Line 63: | Line 76: | ||
| <code php> | <code php> | ||
| - | define(' | ||
| require " | require " | ||
| + | define(' | ||
| $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC; | ||
| - | // $db Connection assumed | + | $db = ADONewConnection(' |
| + | $db-> | ||
| print_r($db-> | print_r($db-> | ||
v5/reference/adodb_assoc_case.1557314819.txt.gz · Last modified: by dregad
