Java web 连接数据库实现注册写到表中
public int input(String sql){
int n=0;
if(stmt!=null){
try {
n=stmt.executeUpdate(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
else{
return 0;
}
return n;
}
上面的代码是什么意思。还有我现在要实现注册功能怎么调用上面代码的方法。
[解决办法]
发布时间: 2012-01-31 21:28:41 作者: rapoo
Java web 连接数据库实现注册写到表中
public int input(String sql){
int n=0;
if(stmt!=null){
try {
n=stmt.executeUpdate(sql);
} catch (SQLException e) {
e.printStackTrace();
}
}
else{
return 0;
}
return n;
}
上面的代码是什么意思。还有我现在要实现注册功能怎么调用上面代码的方法。
[解决办法]