Mi Lugarcito
MySql - SQL syntax error 본문
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... 에러
object를 db에 저장해야 할때 syntax error 해결방법 : query 문에서 아래와 같이 back tick 이 아니라
`update studio_contents set title=?,imgs=?,made_type=?,w_size=?,h_size=? where idx=? and user_id=?`
`
아래와 같이 ""로 쿼리구문 써주면 됨
await con.promise().query("update studio_contents_data set `data`=? where c_idx=?",[JSON.stringify(data),idx]);