<?php
//--Class Course--------------------------

include_once "clsbase_Course.php";

class 
Course extends base_Course{

function 
RSCourseLimit($start$pageSize){
    
$this->SetQuery("select * from Course order by courseId limit $start, $pageSize");
}

function 
RSCourseByCoCodeAndCoName($xKey$yKey){
    
$this->SetQuery("select * from Course where courseCode like '%$xKey%' and courseName like '%$yKey%'");    
}

function 
RSCourseByCoCodeAndCoNameLimit($xKey$yKey$start$pageSize){
    
$this->SetQuery("select * from Course where courseCode like '%$xKey%' and courseName like '%$yKey%' order by courseId limit $start, $pageSize");    
}

function 
SearchByCourseCode($xKey){
    
$this->SetQuery("select * from Course where courseCode='$xKey'");    
}

// Use on page classTable.php
function SearchByCourseName($xKey){
    
$this->SetQuery("select * from Course where courseName like '%$xKey%' order by courseId");    
}
//-- The End --

//-- Use on page addCourseInGroup.php --
function RSCourseByConId($cKey){
    
$this->SetQuery("select * from Course where conditionId='$cKey' order by courseId");    
}
//-- The end --

// Use on page course.php
function SearchByCourseCodeAndCourseName($cCode,$cName,$cNameEng){
    
$this->SetQuery("select * from Course where courseCode like '%$cCode%' and courseName LIKE '%$cName%' and courseNameEng LIKE '%$cNameEng%' order by courseId");
}
//-- The End --

//--End class Course--
?>