MySQL autocomplete - select the database by project

Hi,

 

I have been using phpstorm for a few months now, but I can't seem to get this working.

basically, when inside an SQL statement (usually a string in a php variable), I press CTRL+SPACE, and the autocomplete window asks me to select a database.

My datasource contains only one database, with about 8 tables, and I'd like to not have to specify the database in each and every SQL statement.

 

is there a way to tell PHP storm to select a database somewhere in the project settings? or is there another way to achieve this?

 

My connection is made in PDO, if that helps.

 

thanks for helping!

1
3 comments
Avatar
Permanently deleted user

Hello,
Please try to set the correct dialect in Settings/Preferences > Languages and Frameworks > SQL Dialects for your project.

1
Avatar
Permanently deleted user

Thanks for replying Vladimir Luchansky, I have already set the correct dialect for my project. It still asks me to pick a database in the autocomplete unfortunately.

0

Please open the data source properties and set "Resolve unqualified properties" to this DB on the Options tab.

0

Please sign in to leave a comment.