热门

最新

红包

立Flag

投票

同城

我的

发布
weixin_47526498
初 来乍到
5 年前
trueweixin_47526498

public Boolean validateLogin(String user, String password) {
Boolean count = false;
String sql = "select Id from student where Id = '" + password + "'";
SQLcontent S = new SQLcontent();
Statement sc = null;
try {
sc = S.sqlcontent().createStatement();
} catch (SQLException throwables) {
throwables.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
ResultSet rs = null;
try {
rs = sc.executeQuery(sql);
if (rs.next())
count = true;
} catch (SQLException throwables) {
throwables.printStackTrace();
}
return count;
}
上边代码,最后返回的count为什么一直是null......,救救孩子。

CSDN App 扫码分享
分享
1
点赞
打赏
  • 复制链接
  • 举报
下一条:
去《震惊了,王者荣耀项目组发了60个月的年终奖!!!妈妈,我要做游戏》, 一起来围观吧 https://blog.csdn.net/perfect2011/article/details/116765119?utm_source=app&app_version=4.7.1
立即登录