I am using the Sphinx search engine and am using it's SQL dialect called SphinxSQL. I have queries like this:
$stmt = $sphinxDb->prepare('
SELECT * FROM my_index
WHERE MATCH(\'@name "' . sphinxapi_EscapeString($_POST['query']) . '"\')
Aside: I know I should be binding the query instead of injecting it, but that's another issue.
PhpStorm detects that the syntax is not valid MySQL and shows an error:
The fact that there's an error in the file causes things like code reformatting not to work (ctrl+alt+l).
So I have two questions:
1. Is there a way, in general (not specifically for sql queries) to ignore an error on a line? (such as a way to place a marker there so the inspection engine just ignores it)
2. Is there a way to let PhpStorm know this query is a different SQL dialect?