我正在尝试在 php 脚本中使用 insert into 创建数据库的新行,但经过数小时的研究,我收到“语法错误,意外 T_LNUMBER”错误。我知道 php 在到达“37bf7a30-b6cf-4642-89c9-031c1f6c34d0”字符串时会搞砸它。我尝试在那里加上引号和双引号,但没有任何效果。你知道周围有什么工作可以帮助我吗?提前非常感谢,并为我糟糕的英语和凌乱的代码感到抱歉。
mysql_query("INSERT INTO `bbdb_item` (`id`, `application_id`, `type`, `name`, `alias`, `created`, `modified`, `modified_by`, `publish_up`, `publish_down`, `priority`, `hits`, `state`, `access`, `created_by`, `created_by_alias`, `searchable`, `elements`, `params`)
VALUES ('$id',
'1',
'item',
'$name',
'$alias',
'$date',
'$date',
'42',
'$date',
'0000-00-00 00:00:00',
'0',
'0',
'1',
'1',
'42',
'',
'1',
' {\n
"37bf7a30-b6cf-4642-89c9-031c1f6c34d0": {\n "0": {\n "value": "http:\\/\\/www.xxxx.com\\/item\\/$id\\/overview.aspx",\n "text": "",\n "target": "0",\n "custom_title": "",\n "rel": ""\n }\n },\n
"d3d4559f-24eb-46b2-a749-068ebd3eceb3": {\n "0": {\n "value": "$id"\n }\n },\n
"0e366b7c-514a-4a37-b651-e6fe8edf78ff": {\n "0": {\n "value": "$country"\n }\n },\n
' {\n
"metadata.title": "",\n
"metadata.description": "",\n
"metadata.keywords": "",\n
"metadata.robots": "",\n
"metadata.author": "",\n
"config.enable_comments": "1",\n
"config.primary_category": "1"\n}')"
)