There is no date field, and it must not be empty
authorJoey Schulze <joey@infodrom.org>
Wed, 6 Jun 2007 08:07:28 +0000 (08:07 +0000)
committerJoey Schulze <joey@infodrom.org>
Wed, 6 Jun 2007 08:07:28 +0000 (08:07 +0000)
src/Infodrom/zeitungen/update.wml

index 920410c..1e47f6c 100644 (file)
        . " WHERE oid = $_POST[oid]";
     } else {
       $query = "UPDATE zeitungen SET "
-        . sprintf ("name='%s',url='%s',description='%s',city='%s',type='%s',changed='%s'",
+        . sprintf ("name='%s',url='%s',description='%s',city='%s',type='%s'",
                  addslashes ($name),
                  addslashes ($url),
                  addslashes ($description),
                  addslashes ($city),
-                 addslashes ($_POST[type]),
-                 addslashes ($_POST[date]))
+                 addslashes ($_POST[type]))
        . " WHERE oid = $_POST[oid]";
     }
   } else {
     $query = "INSERT INTO zeitungen "
       . "(name,url,description,city,type,changed) VALUES ("
-        . sprintf ("'%s','%s','%s','%s','%s','%s'",
+        . sprintf ("'%s','%s','%s','%s','%s','now()'",
                  addslashes ($name),
                  addslashes ($url),
                  addslashes ($description),
                  addslashes ($city),
-                 addslashes ($_POST[type]),
-                 addslashes ($_POST[date]))
+                 addslashes ($_POST[type]))
       . ")";
 
   }