🌳 에러 코드
### Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',`reviewCategoryId` = 'Sports'
,`languageCategoryId` = 'EN'
,`title` = '' at line 3
### The error may exist in file [/Users/hongyuri/Desktop/메가스터디 IT/language/workspace/Language/bin/main/mappers/reviewMapper.xml]
### The error may involve com.language.review.dao.ReviewMapper.updateReviewByUserId-Inline
### The error occurred while setting parameters
### SQL: UPDATE `review_writing` SET ,`reviewCategoryId` = ? ,`languageCategoryId` = ? ,`title` = ? ,`rating` = ? ,`content` = ? ,`ImagePath` = ? ,`updatedAt` = NOW() WHERE `userId` = ?
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',`reviewCategoryId` = 'Sports'
,`languageCategoryId` = 'EN'
,`title` = '' at line 3
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ',`reviewCategoryId` = 'Sports'
,`languageCategoryId` = 'EN'
,`title` = '' at line 3
🌳 해결 방법
🌾 원인 : xml에서 문법 오타
🌾 해결 방법 : SET 앞에 ,를 지운다.
Before
After
'코딩 에러 및 질문' 카테고리의 다른 글
org.apache.ibatis.binding.BindingException (0) | 2023.05.27 |
---|---|
해당 사용자 글이 모두 수정되는 현상 (0) | 2023.05.27 |
nested exception is org.apache.ibatis.binding.BindingException: (0) | 2023.05.26 |
org.springframework.web.bind.MissingServletRequestParameterException (0) | 2023.05.26 |
댓글이 있는 글에 비어있는 댓글이 나오는 현상. (0) | 2023.05.26 |