这怎么了 它返回“语法错误... ...检查您是否具有正确的MySQL版本以在'to,content,link)VALUES附近使用...“
$notito = $idoftheguy;
$contentofnoti = $username." just posted a comment on your update.";
$linkofnoti = "http://mywebsite.net/post.php?id=".$thepostid;
/* Now let's insert this */
$insertnoti = mysql_query("INSERT INTO newnotifications (to, content, link) VALUES ('$notito', '$contentofnoti', '$linkofnoti')");
查询中的所有上述所有内容都存在于数据库中。这是给出错误的确切输入(尚未尝试任何其他输入):
$ notito = 1;
$ contentofnoti =“沙特刚刚对您的更新发表了评论。”
$ linkofnoti =“ http://mywebsite.net/post.php?id=22 ”;
如前所述。to
是一个保留字。试试下面的代码:
$insertnoti = mysql_query("INSERT INTO newnotifications (`to`, `content`, `link`) VALUES ('$notito', '$contentofnoti', '$linkofnoti')");
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句