MySQL INSERT INTO无故障地失败(MySQL INSERT INTO fails silently without error)

编程入门 行业动态 更新时间:2024-10-28 11:33:14
MySQL INSERT INTO无故障地失败(MySQL INSERT INTO fails silently without error) $dotheactvity = $db->db_exec("INSERT INTO activity (notification, by, on, extra, extra2) VALUES ('$nou', '$nome', '$tehtime', '$herpdederp', '$id2')");

出于某种原因,这个查询只是失败而没有警告。 其他一切正常,但不是这条线。 我检查了所有变量。 我似乎也无法在日志中找到任何东西。

(请原谅我在提出我的观点方面不成熟)

$dotheactvity = $db->db_exec("INSERT INTO activity (notification, by, on, extra, extra2) VALUES ('$nou', '$nome', '$tehtime', '$herpdederp', '$id2')");

For some reason, this query just fails without warning. Everything else works, but not this line. I checked, and all the variables exist. I can't seem to find anything in logs, either.

(please excuse my immaturity in naming my arguments)

最满意答案

by并且是MySQL保留字

请尝试将它们放在备注中。

by and on are MySQL reserved words.

Try enclosing them in back-ticks.

更多推荐

本文发布于:2023-08-02 05:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1371093.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无故障   INSERT   MySQL   error   silently

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!