From fe739ea9e619d5258d054faee37cf4625d840a2f Mon Sep 17 00:00:00 2001 From: Qing Date: Sat, 8 Jul 2023 20:27:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/UserDao.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/hellogithub/dao/UserDao.java b/src/com/hellogithub/dao/UserDao.java index 96a9a11..ff24310 100644 --- a/src/com/hellogithub/dao/UserDao.java +++ b/src/com/hellogithub/dao/UserDao.java @@ -63,7 +63,7 @@ public class UserDao { connection = JdbcUtils.getConnection(); // sql语句写的操作 ----加上事务 JdbcUtils.beginTransaction(connection); // 开启事务 - String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`,projectNum,contributionValue,userLevel,userAvatar) VALUES (null, ?, ?,?,1,0,0,1,'E:\\Desktop\\helloGithub\\web\\uploadFile\\69e56c15-20d5-43a4-916b-1d6230a33b8e_default.png');"; + String insertSql = "INSERT INTO `user` (`userId`, `userName`, `userPassword`,`creatTime`,`isValid`,projectNum,contributionValue,userLevel,userAvatar) VALUES (null, ?, ?,?,1,0,0,1,'E://Desktop//helloGithub//web//uploadFile//69e56c15-20d5-43a4-916b-1d6230a33b8e_default.png');"; preparedStatement = connection.prepareStatement(insertSql); preparedStatement.setString(1, userName); preparedStatement.setString(2, userPwd);