I use PHPStorm 2019.3.2 and I have a problem related to SQL queries inside my PHP scripts. I created a Database connection inside Database tool window and it seems working fine, I tested the connection and it works fine and I see all the tables I want to work with. The problem is that the editing window report the "Unable to resolve table name" in all of the espression inside my PHP code that contain an SQL query, as it can see in the picture below
For example, If I go with the mouse on "SELECT * FROM question" I get an error message, but the connection to the database seems ok, as it can see the window to the right.
Also if I try to use the SQL console, all the autocompletion and suggestions in both SQL syntax and table or column names work fine, as in the picture below.
I already tried some suggestions in this forum or in StackOverflow, but nothing helped.