Changes done on the Mac.
[cocanwiki.git] / scripts / mailing_list_unsubscribe.ml
index 970cf4e..346a332 100644 (file)
@@ -1,7 +1,7 @@
 (* COCANWIKI - a wiki written in Objective CAML.
  * Written by Richard W.M. Jones <rich@merjis.com>.
  * Copyright (C) 2004 Merjis Ltd.
- * $Id: mailing_list_unsubscribe.ml,v 1.3 2006/03/27 18:09:46 rich Exp $
+ * $Id: mailing_list_unsubscribe.ml,v 1.4 2006/03/28 13:20:00 rich Exp $
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -31,9 +31,8 @@ let run r (q : cgi) dbh hostid _ _ =
   let opt_out = q#param "o" in
 
   (* Update the database. *)
-  let sth = dbh#prepare_cached "delete from mailing_lists
-                                 where hostid = ? and opt_out = ?" in
-  sth#execute [Some hostid; Some opt_out];
+  PGSQL(dbh) "delete from mailing_lists
+               where hostid = $hostid and opt_out = $opt_out";
 
   PGOCaml.commit dbh;