Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

db2: Changing ADODB_ASSOC_CASE has no effect on column name casing #719

Closed
HeshamShahtout opened this issue Apr 7, 2021 · 4 comments · Fixed by #722
Closed

db2: Changing ADODB_ASSOC_CASE has no effect on column name casing #719

HeshamShahtout opened this issue Apr 7, 2021 · 4 comments · Fixed by #722
Assignees
Labels
bug db2 IBM DB2 (Tier 1)
Milestone

Comments

@HeshamShahtout
Copy link

When trying to fetch columns in DB2 database with the 5.21.0 driver.

The column names are returned in lower case instead of upper case with no way to change it.

@mnewnham
Copy link
Contributor

mnewnham commented Apr 8, 2021

When you say fetch columns, do you mean via fields() or metaColumns() ? could you provide a short code segment please.

@mnewnham mnewnham added bug db2 IBM DB2 (Tier 1) labels Apr 8, 2021
@HeshamShahtout
Copy link
Author

HeshamShahtout commented Apr 8, 2021

$stmt = "SELECT USR_E_NM FROM USR WHERE USR_ID='".$user_id."'";
$res = Database::getConnection()->Execute($stmt);
return $res->fields['USR_E_NM'];

For example inside this code snippet when trying to fetch USR_E_NM php throws an error saying the index doesn't exist
when printing the $res->fields the field name is shown in lower case as usr_e_nm instead of USR_E_NM

This issue was not present in the version 5.20.17

@mnewnham mnewnham changed the title DB2 Column names Lower Case db2: Changing ADOB_ASSOC_CASE has no effect on column name casing Apr 8, 2021
@mnewnham mnewnham changed the title db2: Changing ADOB_ASSOC_CASE has no effect on column name casing db2: Changing ADODB_ASSOC_CASE has no effect on column name casing Apr 8, 2021
@mnewnham mnewnham self-assigned this Apr 8, 2021
@mnewnham mnewnham added this to the v5.21.1 milestone Apr 8, 2021
@dregad dregad closed this as completed in 9e1a2a9 Apr 22, 2021
@lkrms
Copy link

lkrms commented Jul 26, 2021

Sorry to bump an old discussion, but I haven't been able to find information about ADOdb's release schedule and I'd love to be able to stop patching vendor/adodb/adodb-php/drivers/adodb-db2.inc.php after every composer install 😄

Is there any chance #722 could be merged as a hotfix while other 5.21.1 issues are pending? 🙏

@mnewnham
Copy link
Contributor

I apologize for the delay on this, unfortunately @dregad ,who is responsible for the releases, is offline at the moment and I don't have the necessary tools to build the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug db2 IBM DB2 (Tier 1)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants