Configuring sprintf Format References

You can have PhpStorm recognize sprintf
format references in injected SQL strings:

Open the Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or
PhpStorm | Preferences for OS X.
Expand the Tools node, and then
click User Parameters under Database.

Select the Enable in console and SQL files and Enable in string literals with SQL injection check boxes.

In the Parameter Patterns list:

Click the %w+ pattern. PhpStorm expands a hidden area with the configuration settings for the pattern.