]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/dbObjects/Organisation.java
fix: problem with updating organisations.
[gigi.git] / src / org / cacert / gigi / dbObjects / Organisation.java
index f3bd822ba9f7a70ff4250c8d33e9b63e35bda215..36119424e3fe9ff41cb7bcbd0207723f08b36086 100644 (file)
@@ -189,13 +189,14 @@ public class Organisation extends CertificateOwner {
                 cert.revoke();
             }
         }
-        try (GigiPreparedStatement ps = new GigiPreparedStatement("UPDATE `organisations` SET `name`=?, `state`=?, `province`=?, `city`=?, `contactEmail`=?")) {
+        try (GigiPreparedStatement ps = new GigiPreparedStatement("UPDATE `organisations` SET `name`=?, `state`=?, `province`=?, `city`=?, `contactEmail`=? WHERE `id`=?")) {
             ps.setString(1, o);
             ps.setString(2, c);
             ps.setString(3, st);
             ps.setString(4, l);
             ps.setString(5, mail);
-            ps.execute();
+            ps.setInt(6, getId());
+            ps.executeUpdate();
         }
         email = mail;
         name = o;