From ac64988809508eadf00b0f6af6655703a09860bf Mon Sep 17 00:00:00 2001 From: sjm <2431685932@qq.com> Date: Sun, 9 Jul 2023 10:50:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E9=A1=B9=E7=9B=AE=E6=97=B6?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/githubDao.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/hellogithub/dao/githubDao.java b/src/com/hellogithub/dao/githubDao.java index 9850cfe..0a94188 100644 --- a/src/com/hellogithub/dao/githubDao.java +++ b/src/com/hellogithub/dao/githubDao.java @@ -63,14 +63,13 @@ public class githubDao { public ResultSetMetaData ret_Github_info(int projectid) { List githubEntityList; ResultSetMetaData rsmd = null; + String sql = "select * from githubinfo WHERE projectId = ?;"; try { Connection conn = JdbcUtils.getConnection(); - PreparedStatement prep = null; + PreparedStatement prep = conn.prepareStatement(sql); ResultSet rs = null; - String sql = "select * from githubinfo WHERE projectId = ? AND isVaild = 0;"; - prep = conn.prepareStatement(sql); prep.setInt(1, projectid); - rs = prep.executeQuery(sql); + rs = prep.executeQuery(); while (rs.next()) { rsmd = rs.getMetaData(); }