<?php
//--Class District--------------------------

include_once "clsbase_District.php";

class 
District extends base_District{

function 
RSDistrictByPvNameAndApNameAndDtName($pvName$apName$dtName){
    
$sql "select * from Province p, Amphur a, District d 
            where p.provinceName like '%$pvName%' and p.provinceId=a.provinceId 
            and a.amphurName like '%$apName%' and a.amphurId=d.amphurId 
            and d.districtName like '%$dtName%' order by p.provinceName, a.amphurName, d.districtName"
;
    
$this->SetQuery($sql);
}

function 
RSDistrictByPvNameAndApNameAndDtNameLimit($pvName$apName$dtName$start$pageSize){
    
$sql "select * from Province p, Amphur a, District d 
            where p.provinceName like '%$pvName%' and p.provinceId=a.provinceId 
            and a.amphurName like '%$apName%' and a.amphurId=d.amphurId 
            and d.districtName like '%$dtName%' order by p.provinceName, a.amphurName, d.districtName 
            limit $start, $pageSize"
;
    
$this->SetQuery($sql);
}

//--End class District--
?>