Fixed return issues with store functions.

This commit is contained in:
Andrew Lalis 2018-08-18 18:29:13 +02:00
parent 1305277207
commit 3ea182fb4c
1 changed files with 4 additions and 2 deletions

View File

@ -123,7 +123,8 @@ public class Database {
PreparedStatement stmt = this.connection.prepareStatement(sql); PreparedStatement stmt = this.connection.prepareStatement(sql);
stmt.setInt(1, ta.getNumber()); stmt.setInt(1, ta.getNumber());
stmt.setInt(2, teamId); stmt.setInt(2, teamId);
return stmt.execute(); stmt.execute();
return true;
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
return false; return false;
@ -155,7 +156,8 @@ public class Database {
stmt.setInt(1, student.getNumber()); stmt.setInt(1, student.getNumber());
stmt.setInt(2, teamId); stmt.setInt(2, teamId);
stmt.setInt(3, student.getPreferredPartners().size() > 0 ? 1 : 0); stmt.setInt(3, student.getPreferredPartners().size() > 0 ? 1 : 0);
return stmt.execute(); stmt.execute();
return true;
} catch (SQLException e) { } catch (SQLException e) {
e.printStackTrace(); e.printStackTrace();
return false; return false;