diff options
| author | Damien Regad <dregad@mantisbt.org> | 2015-05-12 00:50:14 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2015-06-25 01:34:04 +0200 |
| commit | 61e2558d754868aabbfd1c92247cddfc090a181e (patch) | |
| tree | f3ae279e3a866fb48e280ef4faba99232dc5e47f /tests | |
| parent | 97c3afacb3e4f98195908101bf3621e5cc847635 (diff) | |
| download | adodb-61e2558d754868aabbfd1c92247cddfc090a181e.tar.gz adodb-61e2558d754868aabbfd1c92247cddfc090a181e.tar.bz2 adodb-61e2558d754868aabbfd1c92247cddfc090a181e.zip | |
Fix GetRowAssoc() default key case
GetRowAssoc() and GetAssocKeys() parameter now defaults to
ADODB_ASSOC_CASE instead of ADODB_ASSOC_CASE_UPPER, which ensures we're
able to properly bind data when using lowercase field names.
Adjusts the test case accordingly.
Fixes #98
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test.php b/tests/test.php index b529c315..9986620f 100644 --- a/tests/test.php +++ b/tests/test.php @@ -913,7 +913,7 @@ END Adodb; print "<p>GetRowAssoc Upper: Should get 1, Caroline</p>"; $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(); + $arr = $rs->GetRowAssoc(ADODB_ASSOC_CASE_UPPER); if ($arr[strtoupper($id)] != 1) {Err("Error 1");print_r($arr);}; if (trim($arr[strtoupper($fname)]) != 'Caroline') {Err("Error 2"); print_r($arr);}; @@ -924,7 +924,7 @@ END Adodb; print "<p>GetRowAssoc Lower: Should get 1, Caroline</p>"; $rs = $db->SelectLimit('select id,firstname from ADOXYZ order by id',1); if ($rs && !$rs->EOF) { - $arr = $rs->GetRowAssoc(false); + $arr = $rs->GetRowAssoc(ADODB_ASSOC_CASE_LOWER); if ($arr['id'] != 1) {Err("Error 1"); print_r($arr);}; if (trim($arr['firstname']) != 'Caroline') {Err("Error 2"); print_r($arr);}; |
