我已将数据库从 MSQL 转换为 MySQL,但出现以下错误。
错误消息:您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 22 行的 'VARCHAR(500)) = 'Male' AND Responses.res_void = 0' 附近使用正确的语法
我无法解决它看起来对我有效的问题?这里有 MySQL no no 吗?
SELECT
Responses.res_col AS answer
,Responses.res_created AS dateCreated
,Responses.res_notes AS note
,Responses.question_id AS questionID
,Responses.res_id AS responseID
,Responses.student_id AS studentID
,Responses.res_answer AS subQuestion
,Responses.survey_id AS surveyID
,Responses.res_void AS void
,Student.res_answer AS filter
FROM
Responses, Responses AS Student
WHERE
Responses.student_id = Student.student_id
AND
Responses.survey_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.surveyID#">
AND
Student.survey_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.surveyID#">
AND
Responses.question_id = <cfqueryparam cfsqltype="cf_sql_integer" value="#arguments.questionID#"> AND
CAST(Student.res_answer AS VARCHAR(500)) = '#arguments.filter#'
AND Responses.res_void = <cfqueryparam cfsqltype="cf_sql_bit" value="#arguments.void#">