            return $students;
        }

        function update($new_course_name) {
            $GLOBALS['DB']->exec("UPDATE courses set course_name = '{$new_course_name}' WHERE id = {$this->getId()};");
            $this->setCourseName($new_course_name);
        }

        function updateCRN($new_crn) {
            $GLOBALS['DB']->exec("UPDATE courses set crn = '{$new_crn}' WHERE id = {$this->getId()};");
        }

        function addStudent($student) {
            $GLOBALS['DB']->exec("INSERT INTO students_courses (course_id, student_id) VALUES ({$this->getId()}, {$student->getId()});");
        }