8000 Access values of all columns with dublicated names in a select query. · Issue #1127 · mysqljs/mysql · GitHub
[go: up one dir, main page]

Skip to content

Access values of all columns with dublicated names in a select query. #1127

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

Closed
alexn1 opened this issue Jun 15, 2015 · 2 comments
Closed

Access values of all columns with dublicated names in a select query. #1127

alexn1 opened this issue Jun 15, 2015 · 2 comments
Assignees
Labels

Comments

@alexn1
Copy link
alexn1 commented Jun 15, 2015

Mysql allows to have a columns with the same names in a select query.
There is no way to fetch row as an array to be able access each column with the same name. Fetcing as an object override all columns by the last one. Please add this feature.

@dougwilson dougwilson self-assigned this Jun 15, 2015
@dougwilson
Copy link
Member

Hi! So there are two solutions to your issue:

  1. Use the remapping feature already a part of the library. Documentation: https://github.com/felixge/node-mysql#joins-with-overlapping-column-names
  2. We have the issue Read data as array #770 still open asking for getting back an array; we're just waiting for someone to offer a PR. Perhaps you can be that person :)

@alexn1
Copy link
Author
alexn1 commented Jun 15, 2015

Thank you very much! Option 1 works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants
0