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

A configuration parameter missing in the examples. #3

Open
magnus-eriksson opened this issue Mar 15, 2016 · 4 comments
Open

A configuration parameter missing in the examples. #3

magnus-eriksson opened this issue Mar 15, 2016 · 4 comments

Comments

@magnus-eriksson
Copy link

I just noticed that the configuration examples in the doc for MySQL are missing the database-parameter for creating a connection. :)

@mrjgreen
Copy link
Owner

That shouldn't be a problem - by design the component works across schemas.

Cheers
Joe Green

On 15 Mar 2016, at 09:30, Magnus Eriksson [email protected] wrote:

I just noticed that the configuration examples for MySQL are missing the database-parameter when creating a connection. :)


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#3

@dotnetCarpenter
Copy link

dotnetCarpenter commented May 5, 2017

Well, it doesn't work for the MySqlConnector.

I was struggling with this issue for little while and didn't get it until I stepped through the code with my debugger. I think it would help a lot to mention it.

@magnus-eriksson
Copy link
Author

magnus-eriksson commented May 5, 2017

You can add the schema in the table() call: $connection->table('databaseName.tableName') or like you usually do in the query: $connection->query('SELECT * FROM databaseName.tableName'). But I agree that this is not well documented, though.

@mrjgreen
Copy link
Owner

mrjgreen commented May 7, 2017

Makes sense, I'll update the docs. However, I do think its good practice to fully qualify table names to avoid ambiguity, and connecting to a "default" schema can sometimes cause confusion.

Its been a while since I've only been dealing with a single schema though, and I understand thats not necessarily the case for everyone.

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

No branches or pull requests

3 participants