X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=scripts%2Frecent.ml;h=94afb984fa34b7c10c9f06e0eec7aab49fbd01bb;hb=da90d13b12890069f0bade66b6676daf80b41bfd;hp=f77645c7631b7e9175e5e0a60873dfa29be1b68c;hpb=6d64033b48791cf96d2d91b9fe24674c75fd0f67;p=cocanwiki.git diff --git a/scripts/recent.ml b/scripts/recent.ml index f77645c..94afb98 100644 --- a/scripts/recent.ml +++ b/scripts/recent.ml @@ -1,7 +1,7 @@ (* COCANWIKI - a wiki written in Objective CAML. * Written by Richard W.M. Jones . * Copyright (C) 2004 Merjis Ltd. - * $Id: recent.ml,v 1.9 2004/10/21 18:35:01 rich Exp $ + * $Id: recent.ml,v 1.10 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 @@ -36,7 +36,8 @@ let run r (q : cgi) (dbh : Dbi.connection) hostid _ _ = let template = get_template dbh hostid "recent.html" in (* Count the number of changes. *) - let sth = dbh#prepare_cached "select count(*) from pages where hostid = ?" in + let sth = dbh#prepare_cached + "select count(*)::int4 from pages where hostid = ?" in sth#execute [`Int hostid]; let count = sth#fetch1int () in