__construct(); } function __construct(){ $this->conn = db_connect(); } public function getListMonth($year, $month){ $nextMonth = date("Y-m", strtotime("+1 month", strtotime("$year-$month-01"))); $sql = "SELECT id, name, DAYOFMONTH(time) AS date FROM din_event WHERE time >= '$year-$month-01' AND time < '$nextMonth-01' ORDER BY time ASC"; $result =& $this->conn->query($sql); if (DB::isError($result) != true){ return $result; }else { error("Events: " . $result->toString()); } } public function displayList($selection = "0000-00-00"){ $sql = "SELECT id FROM din_event WHERE time > $selection ORDER BY time ASC"; $result =& $this->conn->query($sql); if (DB::isError($result) != true){ if ($result->numRows() > 0){ ?>
| tittel | type | ansvarlig | dato | |||
|---|---|---|---|---|---|---|
Ingen aktiviteter registrert.
"); } }else { error("Events: " . $result->toString()); } } } ?>