String sql="update users set(name,http,email,qq,msn,moblie,tell,province,address,occupation,sex,city) values(?,?,?,?,?,?,?,?,?,?,?,?) where username='"+username+"' and password='"+password+"'";
Connection conn =Dbconn.getConn();
PreparedStatement stmt=conn.prepareStatement(sql);
stmt.setString(1,pn);
stmt.setString(2,w);
stmt.setString(3,mail);应该是where那里错误,怎样改正
Connection conn =Dbconn.getConn();
PreparedStatement stmt=conn.prepareStatement(sql);
stmt.setString(1,pn);
stmt.setString(2,w);
stmt.setString(3,mail);应该是where那里错误,怎样改正
update tlb set (col1,col2) values (v1,v2);改成String sql="update users set name=?,http=?,email=?,qq=?,msn=?,moblie=?,tell=?,province=?,address=?,occupation=?,sex=?,city=? where username='"+username+"' and password='"+password+"'";
update users set name = ? , http=?, email=?, qq=?, msn=?, mobile=?, .....,sex=?,city ?,?,?,?) =? where username='username' and password='password';
你那格式mysql不支持,他会说你语法错误的