输入特殊字符(如“”和其他字符)时出现CDbException

时间:2018-08-14 08:22:16

标签: mysql

CDbCommand无法执行SQL语句:

SQLSTATE[42000]: Syntax error or access violation: 1064 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 '''',AppraiseeMarks='',SupervisorMarks='' WHERE OprasTxnId =63183' at line 1.

执行的SQL语句为:

UPDATE Oprastxn SET ProgressMade=''',AppraiseeMarks='',SupervisorMarks='' WHERE OprasTxnId =63183 

0 个答案:

没有答案