Files
FHC-Core/application/models/codex/Gemeinde_model.php
T
bison fbed4b2261 - Added new library ReihungstestLib
- Added method isEntitled to FCH_Model
- Cleaned the controllers by moving the database related code in the models or libraries
2016-08-30 12:26:22 +02:00

22 lines
485 B
PHP

<?php
class Gemeinde_model extends DB_Model
{
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->dbTable = "bis.tbl_gemeinde";
$this->pk = "gemeinde_id";
}
public function getGemeindeByPlz($plz)
{
$this->addSelect("DISTINCT ON (ortschaftsname) ortschaftsname, gemeinde_id, plz, name, ortschaftskennziffer, bulacode, bulabez, kennziffer");
$this->addOrder("ortschaftsname");
return $this->loadWhere(array("plz" => $plz));
}
}