1

I have already posted here the issue https://github.com/mariano/node-db-mysql/issues/81

When i get results of join there is bad handling of conflict of names of attributes.

Some help? Some help for modifying the c++ code and for making it working fine too.

I'm using db-mysql for a project and i don't want change it to resolve this problem. I want to avoid to substitute join with several queries executed in sequence.

1 Answer 1

2

This is not a bug. MySQL renamed conflicted column names automatically. If your result have conflicted column names (person for example) it will be mapped to 'person' and 'person1'. You can map conflicted columns manually to avoid default name changing. For example:

SELECT A.id, A.name, B.name AS bname, B.year FROM A INNER JOIN B ON A.id = B.a_id WHERE B.year > 2000
Sign up to request clarification or add additional context in comments.

1 Comment

This is not the problem, or this solution doesn't resolve the problem. I think the problem is in mysql-db module

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.