How to teach PhpStorm to recognise drupal {table} SQL syntax? I'm dealing with some really old drupal project full of SQL queries. PhpStorm's understanding of SQL is very handy however I have problems with drupalism like {table_name}. IDE complains that &lt;reference&gt; expected, got '{'.

How can i set up PhpStorm so that it will understand that the string inside curly braces is just a table name? Or at least make it ignore the curly braces?
In PhpStorm Preferences > Tools > Database > User Parameters:


Check "Enable in string literals with SQL injection"
Add \{\w+\} to Parameter Patterns.


You may also want to modify the line with %\w+ to be allowed for language php for placeholders like %d. See screenshot and also JetBrain's PhpStorm blog post: Database Language Injection Configuration.