public function getExaminationNoteForStudent($student) { $criteria = new Criteria(); $criteria->addJoin(CourseSubjectStudentExaminationPeer::COURSE_SUBJECT_STUDENT_ID, CourseSubjectStudentPeer::ID); $criteria->add(CourseSubjectStudentExaminationPeer::EXAMINATION_SUBJECT_ID, $this->getId()); $criteria->add(CourseSubjectStudentPeer::STUDENT_ID, $student->getId()); return CourseSubjectStudentExaminationPeer::doSelectOne($criteria); }
public function getLastCourseSubjectStudentExamination() { $c = new Criteria(); $c->addDescendingOrderByColumn(CourseSubjectStudentExaminationPeer::ID); $c->add(CourseSubjectStudentExaminationPeer::COURSE_SUBJECT_STUDENT_ID, $this->getId()); return CourseSubjectStudentExaminationPeer::doSelectOne($c); }