select count now returns an int8. This fixes the broken 'Recent changes' pages.
[cocanwiki.git] / scripts / rebuild_links.ml
index 354776a..34642c1 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: rebuild_links.ml,v 1.3 2004/10/23 12:00:24 rich Exp $
+ * $Id: rebuild_links.ml,v 1.4 2005/11/23 11:32:13 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
@@ -40,7 +40,7 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ =
   (* Estimate how many sections we will have to process. *)
   let sth =
     dbh#prepare_cached
-      "select count(c.id) from contents c, pages p
+      "select count(c.id)::int4 from contents c, pages p
         where c.pageid = p.id
           and p.hostid = ?
           and p.url is not null