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';
看起来$this->recipientDbColumn['result_id']
为null或空。查看error_reporting(E_ALL)
的错误日志,它可能有未定义的索引错误。
同样,回显实际的SQL查询并将其张贴在这里,问题应该很明显。
$this->recipientDbColumn['result_id']
和$this->recipientDbColumn
如错误提示返回空字符串
…在EXECUTE("UPDATE SET =test WHERE =test")
可以看到,调用返回空字符串。检查代码中您错过的地方!
根据错误,您的$this->recipientDbTable
&其他变量不包含值
试
echo $this->recipientDbColumn;
检查是否打印值