We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String sql = "SELECT * FROM friends WHERE username = ?"; try { pstmt = conn.prepareStatement(sql); pstmt.setString(1, username); resultSet = pstmt.executeQuery(); if (resultSet.next()) { for (int i = 1; i <= 20; i++) { if (resultSet.getString("friend_" + i) == null) { return "friend_" + i; } } } 字段的数量不算固定的吗,不算就两个字段,一个Username 一个friend
String sql = "SELECT * FROM friends WHERE username = ?"; try { pstmt = conn.prepareStatement(sql); pstmt.setString(1, username); resultSet = pstmt.executeQuery(); if (resultSet.next()) { for (int i = 1; i <= 20; i++) { if (resultSet.getString("friend_" + i) == null) { return "friend_" + i; } } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
String sql = "SELECT * FROM friends WHERE username = ?"; try { pstmt = conn.prepareStatement(sql); pstmt.setString(1, username); resultSet = pstmt.executeQuery(); if (resultSet.next()) { for (int i = 1; i <= 20; i++) { if (resultSet.getString("friend_" + i) == null) { return "friend_" + i; } } }
字段的数量不算固定的吗,不算就两个字段,一个Username 一个friend
The text was updated successfully, but these errors were encountered: