0
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';
Martin G
  • 17,357
  • 9
  • 82
  • 98
Spidey
  • 45
  • 5

3 Answers3

0

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.

Matt Parlane
  • 453
  • 2
  • 11
0

$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!

Suhail Gupta
  • 22,386
  • 64
  • 200
  • 328
0

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

Harshit
  • 5,147
  • 9
  • 46
  • 93