+ var $nr_parameters, $removed_parameters;
+ var $nr_notifications, $closed_notifications;
+ var $nr_logs;
+
+ function GatherStatistics($objectid)
+ {
+ // Gather statistics on parameters
+
+ $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('"
+ . $objectid . "' AS BIGINT) AND statname='parameters'");
+ $stat = pg_fetch_object($r, 0);
+ $this->nr_parameters = $stat->statvalue;
+
+ $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('"
+ . $objectid . "' AS BIGINT) AND statname='removed_parameters'");
+ $stat = pg_fetch_object($r, 0);
+ $this->removed_parameters = $stat->statvalue;
+
+ // Gather statistics on notifications
+
+ $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('"
+ . $objectid . "' AS BIGINT) AND statname='notifications'");
+ $stat = pg_fetch_object($r, 0);
+ $this->nr_notifications = $stat->statvalue;
+
+ $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('"
+ . $objectid . "' AS BIGINT) AND statname='closed_notifications'");
+ $stat = pg_fetch_object($r, 0);
+ $this->closed_notifications = $stat->statvalue;
+
+ // Gather statistics on log entries
+
+ $r = pg_exec ($this->database, "SELECT statvalue FROM object_statistics WHERE objectid=CAST('"
+ . $objectid . "' AS BIGINT) AND statname='logs'");
+ $stat = pg_fetch_object($r, 0);
+ $this->nr_logs = $stat->statvalue;
+
+ }
+