Annoying underline in my sql statement

Hi, I have problem in the phpstorm,why is it that it will always underline my sql statement

example.

   sql = "select column1,column2 from users where id = '2'";

and it will show the tooltip "No data sources configure to run this SQL and provide advance code assistance.etc..
and also it follows "Please configure SQL dialect for this file. etc......".


bu this sql statement is working.it only just showing underline on it and  a tooltip.can you help me please how to fixed this.

I am working in phpmyadmin localhost,windows 7 O.S

Thank you in advance.

9 comments
Comment actions Permalink

Hi there,

You can turn off those inspections (if you do not need additional SQL support/checks) in Settings | Inspections | SQL

0
Comment actions Permalink

Hi thank you for the reply,..

Bazzik wrote:

Hi there,

You can turn off those inspections (if you do not need additional SQL support/checks) in Settings | Inspections | SQL

But i want also to have an sql support, i have question is this normal to have underline on sql statement if we want to have an sql support?


Thank you in advance.

0
Comment actions Permalink

If you want to have that *extra* sql support -- then you have to do what those inspections tell you to do:

  1. Define SQL Dialect for whole project / this file (Settings | SQL Dialects) -- http://www.jetbrains.com/phpstorm/webhelp/sql-dialects.html
  2. Setup Data Source (see "Database" tool window .. or "View | Tool Windows | Database") -- http://www.jetbrains.com/phpstorm/webhelp/database-tool-window.html
2
Comment actions Permalink

Bazzik wrote:

If you want to have that *extra* sql support -- then you have to do what those inspections tell you to do:

  1. Define SQL Dialect for whole project / this file (Settings | SQL Dialects) -- http://www.jetbrains.com/phpstorm/webhelp/sql-dialects.html
  2. Setup Data Source (see "Database" tool window .. or "View | Tool Windows | Database") -- http://www.jetbrains.com/phpstorm/webhelp/database-tool-window.html

Hi,  Can you help me please what data source should i will download,..I am using wampserver. i don't know what to download

Thank you in advance.

0
Comment actions Permalink

WAMP means MySQL -- this blog post should have all the answers: http://blog.jetbrains.com/webide/2012/11/sql-support-and-database-tools/

0
Comment actions Permalink

Hi Andriy Bazanov, Thank you so much your so helpfull..you save me.

:)

0
Comment actions Permalink

Hi, I have I think the same problem but with SQLite and Js. I have done all these settings but these red lines appear still.

 

 

0
Comment actions Permalink

@Wojciech Gaudnik

1. How is your Data Source is defined (show screenshots of the General and Schemas tabs)? You might be missing some stuff there.

2. Please check what SQL PhpStorm actually executes when retrieving data for that table.

The Editor tab with the data has "main.Strip" name -- looks like it requires specifying the schema as well (as it may have been not defined at the Data Source).

3. SQL Resolution Scopes (the Settings screen) -- try specifying that DB/schema there (especially if you have not selected anything in the Data Source settings)

 

It all looks like you just need to select that missing schema as a default for IDE to recognize and match it all properly.

0
Comment actions Permalink

Andriy Bazanov

yea, you have right, now everything goes well. Thank you very much for helping me :)

0

Please sign in to leave a comment.