weixin_33737134 2012-09-10 13:27 采纳率: 0%
浏览 24

列不允许,ajax提交

What I have is a form for managing who gets notifications concerning another web app. It is very simple: add and delete who gets the notifications. On the delete field I have a jQuery autocomplete function, and on select it asks the user to confirm the deletion. If yes, it does a jQuery .ajax() call to my coldfusion file that deletes the user from the Oracle database. This function works as it should. On the add field, I have a jQuery .change() event that confirms the add. If yes, it should add the user email and an auto-incremented ID. This is where my problem is. I am getting a database error from the server and I don't know why. The syntax looks correct to me. I have used this syntax in other places in my app and it worked. Does anyone see my problem?

<cftry>
<cfif IsDefined('URL.theAction') && URL.theAction eq 'delete'>
    <cfquery name="qDeleteUser" datasource="#thedb#">
        DELETE
        FROM notify
        WHERE user_id = <cfqueryparam value="#URL.theID#" cfsqltype="CF_SQL_NUMERIC">
    </cfquery>
<cfelse>
    <cfquery name="qAddUser" datasource="#thedb#">
        INSERT INTO notify (user_id, name)
        VALUES (seq_notifyid,
        <cfqueryparam value="#URL.theName#" cfsqltype="CF_SQL_VARCHAR">)
    </cfquery>
</cfif>

The catch produces this:

error code: 984

message: [Macromedia][Oracle JDBC Driver][Oracle]ORA-00984: column not allowed here

column:0

line:9

  • 写回答

2条回答 默认 最新

  • ??yy 2012-09-10 13:34
    关注

    Closing brackets for INSERT statement missing in

    <cfquery name="qAddUser" datasource="#thedb#">
            INSERT INTO notify (user_id, name)
            VALUES (seq_notifyid,
            <cfqueryparam value="#URL.theName#" cfsqltype="CF_SQL_VARCHAR">     
     </cfquery>
    
    评论

报告相同问题?

悬赏问题

  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)
  • ¥20 matlab yalmip kkt 双层优化问题
  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入