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

Incorrect field names quatation in query #161

Open
Napas opened this issue Apr 3, 2017 · 7 comments
Open

Incorrect field names quatation in query #161

Napas opened this issue Apr 3, 2017 · 7 comments
Assignees
Labels

Comments

@Napas
Copy link

Napas commented Apr 3, 2017

When using 'database_name.table_name.field_name' as a field name in query it becomes

`database_name`.`table_name.field_name`.

Should be:

`database_name`.`table_name`.`field_name`

@usmanhalalit
Copy link
Owner

Thanks for reporting @Napas . Will take a look.

@eL-Prova
Copy link

eL-Prova commented Apr 3, 2017

@usmanhalalit is alive xD

@usmanhalalit
Copy link
Owner

@eL-Prova hehe 😄 . Yep, coming back. Had serious eye surgeries, I had a retinal detachment.

@eL-Prova
Copy link

eL-Prova commented Apr 3, 2017

(Y) I hope you are doing well

@Napas
Copy link
Author

Napas commented Apr 13, 2017

Any luck?

@TCB13
Copy link

TCB13 commented Nov 25, 2017

@Napas can you show us a practical use case where it is important to specify the database name? Thank you.

@Napas
Copy link
Author

Napas commented Dec 13, 2017

@TCB13 Joining tables from different databases.

QB::table('db1.some_table')->innerJoin( 'db2.some_table', 'db1.some_table.foreign_key', '=', 'db2.some_table.primary_key' )

Aliasing table names might be a workaround for that, but still, it is a workaround.

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

No branches or pull requests

4 participants