Php 转义字符串上的MySQL查询语法错误

Php 转义字符串上的MySQL查询语法错误,php,mysql,Php,Mysql,我在尝试此查询时遇到此错误: INSERT INTO `5` VALUES ('photo', 'headline', 'LA Lakers', 'http://facebook.com/NUMBER', 'Here\'s video from the An...', 'NUMBER', 'http://www.facebook.com/NUMBER/posts/NUMBER', 'NUMBER'), 'https://graph.facebook.com/NUMBER/picture?acce

我在尝试此查询时遇到此错误:

INSERT INTO `5` VALUES ('photo', 'headline', 'LA Lakers', 'http://facebook.com/NUMBER', 'Here\'s video from the An...', 'NUMBER', 'http://www.facebook.com/NUMBER/posts/NUMBER', 'NUMBER'), 'https://graph.facebook.com/NUMBER/picture?access_token=AAAGGhZBZB1ZCf4BAD1fNpORWVGtWhUI5u**********************&type=normal')
php函数mysql\u real\u escape\u string转义单个值(而不是整个查询)之后


我已将所有配置文件ID更改为字符串编号,并在访问令牌中添加了星号以保护我的隐私。这些通常不存在。

试试这个;最后一个参数在括号外

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 ''https://graph.facebook.com/NUMBER/picture?access_token=AAAGGhZBZB1ZC' at line 1

您忘记了插入查询的最后一个值中的圆括号…
此外,在表格名称中使用撇号…
像这样:

INSERT INTO `5` VALUES ('photo', 'headline', 'LA Lakers', 'http://facebook.com/NUMBER', 'Here\'s video from the An...', 'NUMBER', 'http://www.facebook.com/NUMBER/posts/NUMBER', 'NUMBER', 'https://graph.facebook.com/NUMBER/picture?access_token=AAAGGhZBZB1ZCf4BAD1fNpORWVGtWhUI5u**********************&type=normal')

插入到
5
值(…),'https://graph.facebook.com/NUMBER/picture?access_token=AAAGGhZBZB1ZCf4BAD1fNpORWVGtWhUI5u**********************&类型=正常“


看看你的括号,它们过早结束,这可能是错误。

你的最后一个值在括号外。我丢失了它,可以断定你是对的。。。不!这不是问题,等等。。。哎呀。我已经坚持了好几个小时了。你说得对。非常感谢你!
INSERT INTO '5' VALUES ('photo', 'headline', 'LA Lakers', 'http://facebook.com/NUMBER', 'Here\'s video from the An...', 'NUMBER', 'http://www.facebook.com/NUMBER/posts/NUMBER', 'NUMBER', 'https://graph.facebook.com/NUMBER/picture?access_token=AAAGGhZBZB1ZCf4BAD1fNpORWVGtWhUI5u**********************&type=normal')