2015-10-14 75 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