ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 9655


Ignore:
Timestamp:
Dec 24, 2008, 3:51:12 PM (13 years ago)
Author:
masabon
Message:

added CommunityPeer::getIdsByMemberId()

Location:
OpenPNE3/trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE3/trunk/lib/form/CommunityConfigForm.class.php

    r9613 r9655  
    9090      }
    9191      $config->setValue($value);
     92      $config->save();
    9293    }
    9394  }
  • OpenPNE3/trunk/lib/model/CommunityPeer.php

    r9599 r9655  
    5050    return $pager;
    5151  }
     52
     53  static public function getIdsByMemberId($memberId)
     54  {
     55    $result = array();
     56
     57    $c = new Criteria();
     58    $c->clearSelectColumns()->addSelectColumn(self::ID);
     59    $c->add(CommunityMemberPeer::MEMBER_ID, $memberId);
     60    $c->addJoin(self::ID, CommunityMemberPeer::COMMUNITY_ID);
     61    $stmt = self::doSelectStmt($c);
     62
     63    while ($row = $stmt->fetch(PDO::FETCH_NUM))
     64    {
     65      $result[] = $row[0];
     66    }
     67
     68    return $result;
     69  }
    5270}
Note: See TracChangeset for help on using the changeset viewer.