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.
更多推荐
发布评论