2015-10-14 78 views
0

我收到了一个像这样的错误“其他信息:您的SQL语法有错误;查看与您的MySQL服务器版本相对应的手册,以便在附近使用正确的语法”当我运行我的code.Iam使用webapi我的mysql查询字符串出错

string query = "SELECT `theatredetails`.*,`location`.`LocationName,`moviemaster`.`MovieMasterId`,`moviemaster`.`MovieName`,`moviemaster`.`Image` FROM `theatredetails` INNER JOIN `location` ON `theatredetails`.`LocationId`=`location`.`LocationId` INNER JOIN `moviemaster` ON `moviemaster`.`TheatreDetailsId`=`theatredetails`.`TheatreDetailsId`"; 

Iam使用3内连接,有没有我的查询错误?

+0

你应该格式化查询,以便它可以读取它。 –

回答

0

你忘了反引号

`location`.`LocationName 
         ^---here