以下是从数据库表中获取电子邮件和密码的java代码片段。
hashedPassword = encrypter.hashPassword(UserPassword);
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup("java:comp/env/jdbc/photog");
Connection connection = ds.getConnection();
String sqlStatement = "SELECT email,firstname FROM registrationinformation WHERE password='" + hashedPassword + "'";
PreparedStatement statement = connection.prepareStatement(sqlStatement);
ResultSet set = statement.executeQuery();
上述语句成功执行,但是如何将电子邮件与密码中的密码分开set
?