duanshang3230
2015-01-24 16:42
采纳率: 100%
浏览 64
已采纳

简单查询中的MySQL语法错误

I have this little bit of code here and I am totally lost as I am getting a syntax error near 'unique = 'dD0231q' LIMIT 1' at line 1. It might be something very simple, but I seem to be blind to my own errors..

 $unique = $_GET["unique"];
 $results = $mysqli->query("SELECT * FROM written WHERE unique = '$unique' LIMIT 1

图片转代码服务由CSDN问答提供 功能建议

我这里有一些代码,我完全迷失了,因为我在'unique =附近遇到语法错误 'dD0231q'限制1'在第1行。这可能是非常简单的事情,但我似乎对自己的错误视而不见..

  $ unique = $ _GET [“  unique“]; 
 $ results = $ mysqli-> query(”SELECT * FROM written WHERE unique ='$ unique'LIMIT 1 
   
 
  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

2条回答 默认 最新

相关推荐 更多相似问题