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.
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
请先登录再写评论。
BTW, double quotes do not solve problem completely if you specifying fields:

yellowIn 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
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`.
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.