(PHP)(SQL)导致此错误的原因是什么?

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET =test WHERE =test' at line 1] in EXECUTE("UPDATE  SET =test WHERE =test")

$sql = 'UPDATE ' . $this->recipientDbTable . ' SET ' . $this->recipientDbColumn['result_id'] . '=' . 'test' . ' WHERE ' . $this->recipientDbColumn . '=' . 'test';

It looks like $this->recipientDbColumn['result_id'] is null or empty. Look at your error log with error_reporting(E_ALL), it may have an Undefined index error.

Also, echo out the actual SQL query and post it here, it should be obvious what the problem is.

Also, use prepared statements.

$this->recipientDbColumn['result_id'] and $this->recipientDbColumn as the error suggests return empty string.

... right syntax to use near 'SET =test WHERE =test' at line 1] in EXECUTE("UPDATE SET =test WHERE =test")

As you could see, the call returned empty string. Check the code for where you missed it!

According to the error, it seems that your $this->recipientDbTable & other variables doesn't contains the values.

Try

echo $this->recipientDbColumn;

Check if it prints the values