- let hostid = sth#serial "hosts_id_seq" in
-
- let sth = dbh#prepare_cached "insert into hostnames (hostid, name)
- values (?, ?)" in
- sth#execute [`Int hostid; `String canonical_hostname];
- List.iter (fun name ->
- sth#execute [`Int hostid; `String name]) hostnames;
-
- let sth = dbh#prepare_cached "insert into pages (hostid, url, title,
- description) values (?, 'index', ?, ?)" in
- sth#execute [`Int hostid; `String title; `String title];
+ let hostid = create_host dbh canonical_hostname hostnames template title
+ "Administrator" "123456" true None in