public function getZoneIds($id)
 {
     $t = array();
     $rs = parent::getCnn()->select(self::$tableName, array(self::$tablePk), array(self::$tableValue0 => $id), 0);
     foreach ($rs as $row) {
         array_push($t, $row[self::$tablePk]);
     }
     return $t;
 }
 public function delete($id_a, $id_b)
 {
     if ($id_a < $id_b) {
         return parent::getCnn()->delete($this->tableName, array($this->tableValue0 => $id_a, $this->tableValue1 => $id_b));
     } elseif ($id_a > $id_b) {
         return parent::getCnn()->delete($this->tableName, array($this->tableValue0 => $id_b, $this->tableValue1 => $id_a));
     } else {
         return false;
     }
 }
 public function delete($id)
 {
     $anid = parent::getValue0($id);
     $avid = parent::getValue1($id);
     if (!parent::delete($id)) {
         return false;
     }
     if (!parent::inUse(self::$tableValue0, $anid)) {
         $this->an->delete($anid);
     }
     if (!parent::inUse(self::$tableValue1, $avid)) {
         $this->av->delete($avid);
     }
     return true;
 }
 protected function delete($id)
 {
     if ($id == null) {
         return false;
     }
     $aid = parent::getValue1($id);
     if (!parent::delete($id)) {
         return false;
     }
     if (!parent::inUse(self::$tableValue1, $aid)) {
         //check node
         $this->a->delete($aid);
     }
     return true;
 }