]> WPIA git - gigi.git/blobdiff - src/org/cacert/gigi/EmailAddress.java
Rename email and domain table to plural.
[gigi.git] / src / org / cacert / gigi / EmailAddress.java
index 365e95388a707f385b275e613e63238551c4a7ac..8f4e2efd000a32c7e090bcb96c9901089693e4f6 100644 (file)
@@ -21,7 +21,7 @@ public class EmailAddress {
     private String hash = null;
 
     private EmailAddress(int id) throws SQLException {
-        PreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT memid, email, hash FROM `email` WHERE id=? AND deleted=0");
+        PreparedStatement ps = DatabaseConnection.getInstance().prepare("SELECT memid, email, hash FROM `emails` WHERE id=? AND deleted=0");
         ps.setInt(1, id);
 
         ResultSet rs = ps.executeQuery();
@@ -49,7 +49,7 @@ public class EmailAddress {
             throw new IllegalStateException("already inserted.");
         }
         try {
-            PreparedStatement ps = DatabaseConnection.getInstance().prepare("INSERT INTO `email` SET memid=?, hash=?, email=?");
+            PreparedStatement ps = DatabaseConnection.getInstance().prepare("INSERT INTO `emails` SET memid=?, hash=?, email=?");
             ps.setInt(1, owner.getId());
             ps.setString(2, hash);
             ps.setString(3, address);
@@ -87,7 +87,7 @@ public class EmailAddress {
         if (this.hash.equals(hash)) {
 
             try {
-                PreparedStatement ps = DatabaseConnection.getInstance().prepare("UPDATE `email` SET hash='' WHERE id=?");
+                PreparedStatement ps = DatabaseConnection.getInstance().prepare("UPDATE `emails` SET hash='' WHERE id=?");
                 ps.setInt(1, id);
                 ps.execute();
                 hash = "";