structure NM = BinaryMapFn(IntKey)
-val outputDir = "/var/www/dyn/"
+val outputDir = "/home/hcoop/public_html/dyn/"
fun generate () =
let
addToParents (#loc lives, count)
end
in
- C.fold db folder NM.empty "SELECT loc, usr FROM Lives"
+ C.fold db folder NM.empty "SELECT loc, usr FROM Lives JOIN WebUserActive ON id = usr"
end
val res = countResidents ()
handle
C.Sql s => (print "SQL exception: \n";
print s;
+ print "\n";
OS.Process.failure)
| Fail s => (print "Fail: ";
print s;
+ print "\n";
OS.Process.failure)
+ | IO.Io {name, function, ...} => (print "IO exception ";
+ print function;
+ print ": ";
+ print name;
+ print "\n";
+ OS.Process.failure)
| ex => (print "Exception!\n";
List.app (fn s => print (s ^ "\n")) (SMLofNJ.exnHistory ex);
OS.Process.failure)