/** * * @param string $where * @return array */ public function find($where) { $result = array(); $table = Database::get_course_table(TABLE_LINK_CATEGORY); $where = $where ? "WHERE {$where}" : ''; $sql = "SELECT * FROM {$table} {$where} ORDER BY display_order DESC"; $rs = Database::query($sql); while ($data = Database::fetch_object($rs)) { $result[] = LinkCategory::create($data); } return $result; }