我的查询需要使用表单中输入的内容更新What_name
。这是我的代码片段:
<cfelseif ARGUMENTS.myForm.Submit EQ "Update_what">
<cfquery name="LOCAL.myURL" datasource="#SERVER.cfc.core.getDSN()#">
SELECT What_name
from logboek.tbl_What
WHERE What_name = <cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.myForm.What_name#" />
</cfquery>
<cfif LOCAL.myURL.RecordCount eq 1>
<cfreturn VARIABLES.Error.myReturn />
<cfelse>
<cfquery name="LOCAL.myURL" datasource="#SERVER.cfc.core.getDSN()#">
UPDATE tbl_What
SET What_name=<cfqueryparam cfsqltype="cf_sql_varchar" value="#ARGUMENTS.myForm.Update_what#" />;
WHERE What_name=<cfqueryparam value="#ARGUMENTS.myForm.What_name#" cfsqltype="cf_sql_varchar">
</cfquery>
</cfif>
我收到以下错误:
消息
string [cms_core.com.blog.blog]没有可访问的成员,名称为[ERROR]
我的查询有问题吗?