From f606f80584fab37c9d30f05ea86e6d304d1f2e50 Mon Sep 17 00:00:00 2001 From: User_cyk <1020691186@qq.com> Date: Mon, 10 Jul 2023 12:02:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=96=E9=94=AE=E7=BA=A6?= =?UTF-8?q?=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/hellogithub/dao/projectDao.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/com/hellogithub/dao/projectDao.java b/src/com/hellogithub/dao/projectDao.java index 4957191..d8d9e5e 100644 --- a/src/com/hellogithub/dao/projectDao.java +++ b/src/com/hellogithub/dao/projectDao.java @@ -369,8 +369,10 @@ public class projectDao { try { Connection conn = JdbcUtils.getConnection(); QueryRunner runner = new QueryRunner(); + runner.update(conn,"set foreign_key_checks = 0"); String sql="delete from project where projectId = ?"; num = runner.update(conn,sql,id); + runner.update(conn,"set foreign_key_checks = 1"); } catch (SQLException e) { throw new RuntimeException(e); }