public function Results() { $list = Family::get(); $blockNo = Convert::raw2sql($this->request->getVar('BlockNo')); $unitNo = Convert::raw2sql($this->request->getVar('UnitNo')); $parishID = Convert::raw2sql($this->request->getVar('ParishID')); $pincode = Convert::raw2sql($this->request->getVar('Pincode')); $isPanchayat = Convert::raw2sql($this->request->getVar('IsPanchayat')); $isMunicipality = Convert::raw2sql($this->request->getVar('IsMunicipality')); $isCorporation = Convert::raw2sql($this->request->getVar('IsCorporation')); if ($parishID) { $list = $list->filter(array('ParishID' => $parishID)); } if ($blockNo) { $list = $list->filter(array('BlockNo' => $blockNo)); } if ($unitNo) { $list = $list->filter(array('UnitNo' => $unitNo)); } if ($pincode) { $list = $list->filter(array('Pincode' => $pincode)); } if ($isPanchayat) { $list = $list->filter(array('IsPanchayat' => $isPanchayat)); } if ($isMunicipality) { $list = $list->filter(array('IsMunicipality' => $isMunicipality)); } if ($isCorporation) { $list = $list->filter(array('IsCorporation' => $isCorporation)); } //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\""); //Debug::show($list); return $list; }
public function Results() { $list = Family::get()->leftJoin('House', '"Family"."ID" = "House"."FamilyID"'); $status = Convert::raw2sql($this->request->getVar('Status')); $holdsRationCard = Convert::raw2sql($this->request->getVar('HoldsRationCard')); $cardType = Convert::raw2sql($this->request->getVar('CardType')); $houseType = Convert::raw2sql($this->request->getVar('Type')); $parishID = Convert::raw2sql($this->request->getVar('ParishID')); if ($parishID) { $list = $list->filter(array('ParishID' => $parishID)); } if ($status) { $list = $list->filter(array('House.Status' => $status)); } if ($holdsRationCard != '') { $list = $list->filter(array('House.HoldsRationCard' => $holdsRationCard)); } if ($holdsRationCard && $cardType) { $list = $list->filter(array('House.CardType' => $cardType)); } if ($houseType) { $list = $list->filter(array('House.Type' => $houseType)); } //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\""); //Debug::show($list); return $list; }
public function Results() { $list = Family::get()->leftJoin('Business', '"Family"."ID" = "Business"."FamilyID"'); $agricultureType = Convert::raw2sql($this->request->getVar('Type')); $parishID = Convert::raw2sql($this->request->getVar('ParishID')); if ($parishID) { $list = $list->filter(array('ParishID' => $parishID)); } if ($agricultureType) { $list = $list->filter(array('Business.Type' => $agricultureType)); } //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\""); //Debug::show($list); return $list; }
public function Results() { $list = Family::get()->leftJoin('ShiftedFrom', '"Family"."ID" = "ShiftedFrom"."FamilyID"'); $status = Convert::raw2sql($this->request->getVar('Status')); $area = Convert::raw2sql($this->request->getVar('Area')); $parishID = Convert::raw2sql($this->request->getVar('ParishID')); if ($parishID) { $list = $list->filter(array('ParishID' => $parishID)); } if ($status != '') { $list = $list->filter(array('ShiftedFrom.Status' => $status)); } //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\""); //Debug::show($list); return $list; }
public function Results() { $list = Family::get()->leftJoin('Land', '"Family"."ID" = "Land"."FamilyID"'); $holdsLand = Convert::raw2sql($this->request->getVar('HoldsLand')); $area = Convert::raw2sql($this->request->getVar('Area')); $parishID = Convert::raw2sql($this->request->getVar('ParishID')); if ($parishID) { $list = $list->filter(array('ParishID' => $parishID)); } if ($holdsLand != '') { $list = $list->filter(array('Land.HoldsLand' => $holdsLand)); } if ($holdsLand && $area) { $list = $list->filter(array('Land.Area' => $area)); } return $list; }