Wierd Error: <comma join expression> expected, got '${'

I am getting the following error
:
<comma join expression> expected, got '${'

I am using the following code:

 // prepare the sql statement to change the password

$statement = $this->db->prepare("SELECT email FROM " . TABLE_USERS . " WHERE username = ? and validationkey = ? LIMIT 1");

                                                                                         ^

I tried to google the error but couldn't find anything on it. If it helps I am using PHPStorm 9 140.2765 EAP. Any assistance would be greatly appreciated

Sincerely,

Customer
1

Hi there,

Please try "File | Invalidate Cacahes..." and restart IDE

0
Avatar
Permanently deleted user

Hello, I have same problem:

class User{

 
     protected static $table_name = "users";
 
     $query = "SELECT * FROM ".self::$table_name ." WHERE id = $id LIMIT 1";

}
I got an error <comma join expression> expected,got '${'

I don't want to invalidate caches so i followed instructions in this article: http://blog.jetbrains.com/phpstorm/2014/11/database-language-injection-configuration/ , but i don't know what to write in "Use i other language string literals" box. I tried $\{\w+$\} and $\{\w+\}, but i don't know what it means and i still having an error.

Thank you for your help.

1
Avatar
Permanently deleted user

I don't know the solution to an explanation for the issue, but the following change cleared the error notification:
From: SELECT email FROM " . TABLE_USERS
To: SELECT email FROM" . " " . TABLE_USERS

Hopefully, this will help someone who knows more than me.

Invalidating Caches and restarting did not fix the problem.

1
Avatar
Permanently deleted user

Very similar call for help in PyCharm at https://intellij-support.jetbrains.com/hc/en-us/requests/622423

More weird error messages:

'(', <reference>, GROUP, HAVING, UNION, WHERE or '{' expected, got '{'

'(', <reference>, or '{' expected, got '}'

The John-Dorner workaround (concatenating literal blank strings) helped in the test case I reported there, but not in my actual code, where it merely moved the error to the blank string.

 

0

请先登录再写评论。