简体   繁体   English

SQL语句返回500错误

[英]SQL Statement returns 500 Error

I have this SQL statement: 我有以下SQL语句:

$sql = "SELECT CONCAT_WS (" ",Firstname, Surname) AS FullName FROM Applicant WHERE AppID=10010";

This statement returns Error 500 on my page despite of that it is a completely correct statement. 该语句在我的页面上返回错误500,尽管它是完全正确的语句。 I run this query on Sequel Pro and it is returning exactly what I need. 我在Sequel Pro上运行此查询,它返回的正是我所需要的。

I tried a simple query and its working fine: 我尝试了一个简单的查询,它的工作正常:

 $sql = "SELECT * FROM Cases";

I don't know why PHP is doing that. 我不知道为什么PHP会这样做。 Maybe an extra pair of eyes can solve this. 也许额外的一双眼睛可以解决这个问题。

wrong double quotes sequence 双引号顺序错误

  $sql = "SELECT CONCAT_WS (' ',Firstname, Surname) AS FullName 
       FROM Applicant WHERE AppID=10010";

you must a different quote char inside the query string 您必须在查询字符串中使用其他引号char

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM