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); }