나는 html 파일을 String
으로 가지고 있는데, 나는 그것을 업데이트 쿼리를 사용하여 MySQL DB에 삽입하고 싶다. - 아마 난 그냥 인용 HTML ""
으로 기운 그것은 또한 많은 특수 문자와 따옴표를 포함로 삽입JDBC를 사용하여 MySQL DB에 html 파일을 저장하는 방법은 무엇입니까?
MySQLSyntaxErrorException: 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 'zglosBladWindow').ck_window.showCenter('this');" href="#">zg?o? b??d na stronie<' at line 1
이 HTML 내부에 somwhere입니다 :하지만 예외 다음 얻을
Statement st = connection.createStatement();
String query = "UPDATE orders SET status='ready', html='"+html+"' WHERE id='123'";
int num = st.executeUpdate(query);
: 나는이 시도 - 내가 어떻게 그것을 삽입 할 수 있니? 어떻게 든 그것을 인코딩해야합니까?
당신은 변수'html'을 탈출해야합니다. – hjpotter92