SetQuery("select * from StudyPlan where programId='$wKey' and studentYear='$xKey' and semester='$yKey' and conditionId='$zKey'"); } function RSStudyPlanByPgIdAndStYAndSe($xKey, $yKey, $zKey){ $sql="select * from StudyPlan where programId='$xKey' and studentYear='$yKey' and semester='$zKey'"; $this->SetQuery($sql); } function RSStudyPlanByPgIdGroupStY($xKey){ $this->SetQuery("select studentYear from StudyPlan where programId='$xKey' group by studentYear"); } function RSStudyPlanByPgIdAndStYGroupSe($xKey, $yKey){ $this->SetQuery("select semester from StudyPlan where programId='$xKey' and studentYear='$yKey' group by semester"); } function RSStudyPlanByPgIdAndCoId($xKey, $yKey){ $this->SetQuery("select * from StudyPlan where programId='$xKey' and courseId='$yKey'"); } function RSStudyPlanByPgId($xKey){ $this->SetQuery("select * from StudyPlan where programId='$xKey'"); } function GetSumCreditTotalByPgIdAndStYAndSe($xKey, $yKey, $zKey){ $this->SetQuery("select sum(creditTotal) as num from StudyPlan, Course where programId='$xKey' and studentYear='$yKey' and semester='$zKey' and StudyPlan.courseId=Course.courseId"); if ($result=$this->GetResult()) { return $result['num']; } } function GetSumCreditTotalByPgId($xKey){ $this->SetQuery("select sum(creditTotal) as num from StudyPlan, Course where programId='$xKey' and StudyPlan.courseId=Course.courseId"); if ($result=$this->GetResult()) { return $result['num']; } } function GetSumCredit1ByPgIdAndStYAndSe($xKey, $yKey, $zKey){ $this->SetQuery("select sum(credit1) as num from StudyPlan, Course where programId='$xKey' and studentYear='$yKey' and semester='$zKey' and StudyPlan.courseId=Course.courseId"); if ($result=$this->GetResult()) { return $result['num']; } } function GetSumCredit2ByPgIdAndStYAndSe($xKey, $yKey, $zKey){ $this->SetQuery("select sum(credit2) as num from StudyPlan, Course where programId='$xKey' and studentYear='$yKey' and semester='$zKey' and StudyPlan.courseId=Course.courseId"); if ($result=$this->GetResult()) { return $result['num']; } } } //--End class StudyPlan-- ?>