- let sth =
- dbh#prepare_cached
- "select registration_date from users where hostid = ? and id = ?" in
- sth#execute [Some hostid; Some userid];
-
- let registration_date =
- match sth#fetch1 () with
- [ `Date registration_date ] -> registration_date
- | _ -> assert false in
+ let registration_date = List.hd (
+ PGSQL(dbh)
+ "select registration_date from users
+ where hostid = $hostid and id = $userid"
+ ) in