<?php
final class WardDao extends Dao {
  private static $ALL = <<<'SQL'
select prefecture_id,
       city_id,
       ward_id,
       ward_name
  from ward
 order by ward_id
SQL;
  private static $PK = <<<'SQL'
select prefecture_id,
       city_id,
       ward_id,
       ward_name
  from ward
 where prefecture_id = '%s'
   and city_id = '%s'
   and ward_id ='%s'
SQL;
  private static $PREFECTURE_CITY_ID = <<<'SQL'
select prefecture_id,
       city_id,
       ward_id,
       ward_name
  from ward
 where prefecture_id = '%s'
   and city_id = '%s'
 order by ward_id
SQL;
  public function getAll() {
    return $this->execute(self::$ALL);
  }
  public function getByPk($pk) {
    return $this->execute(self::$PK, $pk);
  }
  public function getByPrefectureCityId($key) {
    return $this->execute(self::$PREFECTURE_CITY_ID, $key);
  }
}
// EOF.
