コード例 #1
1
 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;
 }
コード例 #2
1
 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;
     }
 }