PhpStorm 8: Is there any way to suppress SQL errors when $tableName is variable?

Is there any way to suppress these errors?

I use #1/2 example a lot and it makes my code yellow/red and frustrated me :[ I think valid code should not be marked like errors.
db-syntax-fail.gif
Last example seems OK but
1. I (and i think a lot of people) do not like strings in double quotes because of look and performance
2. Code with single quotes and break-in variable is absolutely valid

2 comments
Comment actions Permalink

BTW, double quotes do not solve problem completely if you specifying fields:

db-syntax-fail-2.gif
In this case IDE (obviously) will not be able to resolve table name and check that field id exists. And this is OK. Not OK is that it reports about error

makes code 
yellow and there is no way to suppress it. :(

Back quotes also reported as error, which is wrong, they are needed in case when you have table named like some SQL reserved word.... like table `TYPE` or `USER`.
0
Comment actions Permalink

subbed to see answer... I'll confirm this is more than annoying. None of my queries are plain text, ALL have variables in them, thus SQL is almost unreadable in phpStorm.

0

Please sign in to leave a comment.