+ /**
+ * Est-ce que le participant existe ? C-à-d qu'il est inscrit.
+ */
+ public function existe()
+ {
+ return $this->id != 0;
+ }
+
+ public function chargerInfos()
+ {
+ if (!$this->existe())
+ return;
+
+ $res = pg_query_params("SELECT * FROM participants WHERE id = $1", array($this->id));
+
+ if (pg_result_status($res) == PGSQL_COMMAND_OK && pg_num_rows($res) === 1)
+ $this->info = pg_fetch_object($res);
+ else
+ $this->id = 0;
+ }
+