diff --git a/src/database/MySQLAccess.java b/src/database/MySQLAccess.java index 69c1138..f66afe9 100644 --- a/src/database/MySQLAccess.java +++ b/src/database/MySQLAccess.java @@ -97,7 +97,8 @@ public void returnDevices(String devices) throws ClassNotFoundException, SQLExce //make into string array; queries need to have numbers as strings! String[] deviceArray = devices.replaceAll("\\[","").replaceAll("\\]","").replaceAll("\\s","").split(","); for(int i = 0; i < deviceArray.length; i++){ - String current = deviceArray[i]; + //update statement + stmt.executeUpdate("UPDATE devices SET Status = \"Available\" WHERE Device_ID = " + deviceArray[i]); } }