__construct($selection); } function __construct($selection = "all"){ $this->conn =& db_connect(); switch ($selection) { case "all": $cond = ""; break; case "new": $cond = "WHERE active = 1"; break; case "old": $cond = "WHERE active != 1"; default: $cond = ""; } $sql = "SELECT id FROM din_bugreport $cond"; $result = $this->conn->query($sql); if (DB::isError($result) != true){ $this->bugs = $result; } } public function getList(){ return $this->bugs; } public function displayList(){ ?>
| title | comment | user |
|---|