<%@ page import="sun.org.mozilla.javascript.internal.json.JsonParser"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page import = "java.io.*, java.sql.*, java.util.*, java.net.*" %>
<%@ page import="org.json.simple.*" %>
<%
String id = null;
String passwd = null;
int weight = 0;
float tall = 0.0f;
Class.forName("com.mysql.jdbc.Driver");
String url="jdbc:mysql://localhost:3306/running_mate";
Connection conn=DriverManager.getConnection(url, "root", "ehlswkd1");
PreparedStatement pstmt = null;
pstmt = conn.prepareStatement("UPDATE membership SET no=?, password=?, weight=?, tall=? WHERE id LIKE ?");
id = request.getParameter("id");
passwd = request.getParameter("passwd");
weight = Integer.valueOf(request.getParameter("weight"));
tall = Float.parseFloat(request.getParameter("tall"));
pstmt.setInt(1, 0); //autoincrement
pstmt.setString(2, id);
pstmt.setString(3, passwd);
pstmt.setInt(4, weight);
pstmt.setFloat(5, tall);
pstmt.executeUpdate();
if (pstmt != null){
pstmt.close();
}
System.out.println("Table에 Update 가 추가되었습니다....");
//System.out.println(weight);
conn.close();
%>
이렇게 하면 "Table에 Update 가 추가되었습니다...." 가 찍히는데
테이블 확인 하면 update 가 되지 않아요
뭐가 문제죠??