dongyin5516 2014-03-29 15:05
浏览 34
已采纳

奇怪的错误您的SQL语法中有错误

Im tring save a form data to a table, but it getting mysql error, i checked everywhwre data types and all other things are ok, here is my mysql query

 INSERT INTO personal_events
        VALUES (
        evt_date, evt_start, evt_end, evt_subject, evt_notes, evt_user
        )
        VALUES (
        '2013-03-29', '11', '12', 'test', 'test notess', 21
       )

error details

#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 'VALUES( '2013-03-29', '11', '12', 'test', 'test notess', 21)' at line 1 

can anyone help me to fix this

  • 写回答

3条回答 默认 最新

  • douzhong3887 2014-03-29 15:06
    关注

    You have two VALUES. Use the following:

    INSERT INTO personal_events
        (
        evt_date, evt_start, evt_end, evt_subject, evt_notes, evt_user
        )
        VALUES (
        '2013-03-29', '11', '12', 'test', 'test notess', 21
       )
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置
  • ¥30 信号与系统实验:采样定理分析
  • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao
  • ¥20 Vite 打包的 Vue3 组件库,图标无法显示
  • ¥15 php 同步电商平台多个店铺增量订单和订单状态
  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别