【发布时间】:2017-09-11 01:12:59
【问题描述】:
我在我的 XAMPP 本地服务器上工作并使用 netbeans 编写 php,下面的代码运行良好。
$sql = "INSERT INTO enneagram (name,course,activity,type,Peacemaker,Loyalist,Achiever,Reformer,Individualist,Helper,Challenger,Investigator,Enthusiast,Instinctive,Feeling,Thinking,Assertive,Dutiful,Withdrawn) VALUES ('$answerdata[0]','$answerdata[1]','$answerdata[2]','$mytypes',$A,$B,$C,$D,$E,$F,$G,$H,$I,$instinctive,$feeling,$thinking,$assetive,$dutiful,$withdrawn)";
我将文件上传到在线服务器上,现在它给了我这个错误
'连接失败:SQLSTATE[42000]:语法错误或访问冲突:1064 您的 SQL 语法有错误;查看与您的 MariaDB 服务器版本相对应的手册,了解在 \' 附近使用的正确语法。 价值观(\'Karim Bahsoun\',\'communication\',\'activity\',\'|Loyalist|Individualis\' at line 1'
这是我查看代码的第三天,并没有意识到为什么它可以离线而不是在线工作。
【问题讨论】: