(* COCANWIKI - a wiki written in Objective CAML.
* Written by Richard W.M. Jones <rich@merjis.com>.
* Copyright (C) 2004 Merjis Ltd.
- * $Id: contacts.ml,v 1.1 2004/09/17 16:03:34 rich Exp $
+ * $Id: contacts.ml,v 1.2 2005/11/23 11:32:12 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
(* Pull out all the contacts from the database. *)
let sth = dbh#prepare_cached
"select c.id, c.name, c.subject,
- (select count(*) from contact_emails
+ (select count(*)::int4 from contact_emails
where contactid = c.id)
from contacts c
where c.hostid = ?