Answer the question
In order to leave comments, you need to log in
How to fix this error in PHPStorm 8?
There is a simple line in the project (PHP):
$stmt = $db->prepare("SELECT * FROM " . $table . " WHERE Value=?");
<coma join expression> expected, got ':'
Answer the question
In order to leave comments, you need to log in
$stmt = $db->prepare(sprintf('SELECT * FROM %s WHERE Value=?', $table));
they added the sql parsing directly to the strings, as it used to be with html.
Try to
insert $table into the string, you use " "
If you still need it, then in the settings I cleared SQL Dialect, and in Inspections -> SQL-> SQL dialect detection unchecked
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question