Warm tip: This article is reproduced from stackoverflow.com, please click
mysql phpstorm

Unable to resolve valid table in PhpStorm

发布于 2020-04-18 09:35:11

I'm getting unable to resolve table errors appear in php files containing SQL querying valid tables.

enter image description here

If I Ctrl + Enter over the query, then I get expected results in the DB console, and if I expand the database in the DB explorer tab then I can see the tables.

It's not affecting code execution, but it's annoying because it catches my eye when writing code, and it masks real SQL errors.

I've tried refreshing the database connection, and I've verified that the php tab is connecting to the correct database.

Questioner
Parris Varney
Viewed
87
LazyOne 2016-07-13 03:38

Try re-creating DB connection from scratch (delete existing one and create it again).


Thinking of possible reasons ... I can think of this scenario:

  • working with project in current stable version (currently 2016.1.x);
  • trying EAP build for next version (2016.2 at this moment) on this project and make some DB-related changes there (even simple syncing DB);
  • going back to stable version (2016.1.x) .. and because new version uses newer file format/versioning for DB-related data (cached DB structure etc) IDE may start ignoring "unknown/newer" format for such data and instead of throwing appropriate warning it just "silently" throwing "unresolved table" message.

No other ideas.