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

GetAssoc: FetchMode ADODB_FETCH_DEFAULT should respect the result from the driver rather than putting values in a numeric array. #886

Closed
clarumedia opened this issue Sep 27, 2022 · 1 comment · Fixed by #900
Assignees
Labels
bug core ADOdb core (library and base classes)
Milestone

Comments

@clarumedia
Copy link

clarumedia commented Sep 27, 2022

if ($fetchMode == ADODB_FETCH_ASSOC

ADODB_FETCH_DEFAULT should be included as one of the options to ensure that the recordset is returned in the default provided by the PHP driver as per the documentation https://adodb.org/dokuwiki/doku.php?id=v5:reference:adodb_fetch_mode

if ($fetchMode == ADODB_FETCH_DEFAULT
|| $fetchMode == ADODB_FETCH_ASSOC
|| $fetchMode == ADODB_FETCH_BOTH)
{

Tested using mysqli

@mnewnham mnewnham added bug core ADOdb core (library and base classes) labels Oct 1, 2022
@mnewnham
Copy link
Contributor

mnewnham commented Oct 1, 2022

Well spotted, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core ADOdb core (library and base classes)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants