当前位置: 首页>>代码示例>>PHP>>正文


PHP PersonPeer::doSelect方法代码示例

本文整理汇总了PHP中PersonPeer::doSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP PersonPeer::doSelect方法的具体用法?PHP PersonPeer::doSelect怎么用?PHP PersonPeer::doSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PersonPeer的用法示例。


在下文中一共展示了PersonPeer::doSelect方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getForSelectParent

 public static function getForSelectParent()
 {
     $c = new Criteria();
     $c->add(PersonPeer::LAST_NAME, null, Criteria::NOT_EQUAL);
     $c->addJoin(self::PERSON_ID, PersonPeer::ID);
     $donors = PersonPeer::doSelect($c);
     $arr = array();
     $arr[0] = '-- select --';
     foreach ($donors as $donor) {
         $arr[$donor->getId()] = $donor->getLastName();
     }
     return $arr;
 }
开发者ID:yasirgit,项目名称:afids,代码行数:13,代码来源:DonorPeer.php

示例2: executeAddPassengerAjax

 /**
  * TODO: Add row to Add Passenger to camp details.
  * CODE:camp_add_passengers
  */
 public function executeAddPassengerAjax(sfWebRequest $request)
 {
     #security
     if (!$this->getUser()->hasCredential(array('Administrator', 'Staff', 'Coordinator'), false)) {
         $this->getUser()->setFlash("warning", 'You don\'t have permission to access this url ' . $request->getReferer());
         $this->redirect('dashboard/index');
     }
     $this->setLayout(false);
     $this->passenger_fname = trim($this->getRequestParameter('passenger_fname', '*')) == '' ? '*' : trim($this->getRequestParameter('passenger_fname', '*'));
     $this->passenger_lname = trim($this->getRequestParameter('passenger_lname', '*')) == '' ? '*' : trim($this->getRequestParameter('passenger_lname', '*'));
     $this->campid = $request->getParameter('id');
     $this->persons = PersonPeer::doSelect(new Criteria());
 }
开发者ID:yasirgit,项目名称:afids,代码行数:17,代码来源:actions.class.php

示例3: executeAjaxAddPersonAndPassenger


//.........这里部分代码省略.........
             $this->person->setFaxComment2($this->person_form->getValue('fax_comment2'));
             $this->person->setEmail($this->person_form->getValue('email'));
             $this->person->setEmailTextOnly($this->person_form->getValue('email_text_only'));
             $this->person->setEmailBlocked($this->person_form->getValue('email_blocked'));
             $this->person->setComment($this->person_form->getValue('comment'));
             //$this->person->setBlockMailings($this->person_form->getValue('block_mailings')==0?null:$this->person_form->getValue('block_mailings'));
             $this->person->setBlockMailings($this->person_form->getValue('block_mailings'));
             $this->person->setNewsletter($this->person_form->getValue('newsletter'));
             $this->person->setGender($this->person_form->getValue('gender'));
             $this->person->setDeceased($this->person_form->getValue('deceased'));
             $this->person->setDeceasedComment($this->person_form->getValue('deceased_comment'));
             $this->person->setSecondaryEmail($this->person_form->getValue('secondary_email'));
             $this->person->setDeceasedDate($this->person_form->getValue('deceased_date'));
             $this->person->setMiddleName($this->person_form->getValue('middle_name'));
             $this->person->setSuffix($this->person_form->getValue('suffix'));
             $this->person->setNickname($this->person_form->getValue('nickname'));
             $this->person->setVeteran($this->person_form->getValue('veteran'));
             if ($this->person->isNew()) {
                 $content = $this->getUser()->getName() . ' added new Person: ' . $this->person->getFirstName();
                 ActivityPeer::log($content);
             }
             $this->person->save();
             //////////////////////////////////////#bglobal omar
             if ($this->person->getId()) {
                 $passenger = new Passenger($this->person->getId());
                 $passenger->setPersonId($this->person->getId());
                 $passenger->save();
                 $c = new Criteria();
                 $c->add(RoleNotificationPeer::MID, 5);
                 $c->add(RoleNotificationPeer::NOTIFICATION, 1);
                 $c->addOr(RoleNotificationPeer::NOTIFICATION, 3);
                 $c->addJoin(RoleNotificationPeer::ROLE_ID, PersonRolePeer::ROLE_ID);
                 $c->addJoin(PersonRolePeer::PERSON_ID, PersonPeer::ID);
                 $personemail = PersonPeer::doSelect($c);
                 $allemail = array();
                 $pindex = 0;
                 foreach ($personemail as $getEmail) {
                     if (strlen($getEmail->getEmail()) > 0) {
                         $allemail[$pindex++] = $getEmail->getEmail();
                     } else {
                         if (strlen($getEmail->getSecondaryEmail()) > 0) {
                             $allemail[$pindex++] = $getEmail->getSecondaryEmail();
                         }
                     }
                 }
                 //$allemail[$pindex]="engfaruque@gmail.com";
                 /*
                                         $email['subject']="New Person added";
                                         $link=$request->getHost()."/person/view/".$this->person->getId();
                                         $body="A new person added in ".$request->getHost()."\r\n"
                                               .$this->person->getFirstName()." ".$this->person->getLastName()."\r\n Profile Link: ".$link;
                                         $email['body']=$body;
                                         $email['sender_email']="admin@afw.com";                        
                 
                                         $this->getComponent('mail', 'sendBulk', array(
                                         'subject' => $email['subject'],
                                         'recievers' => $allemail,
                                         'sender' => $email['sender_email'],
                                         'body' => $email['body'],
                                         ));*/
             }
             /////////////////////////////////////
             if ($request->hasParameter('has')) {
                 $data = '';
                 if ($request->getParameter('camp_id')) {
                     $data = '&camp_id=' . $request->getParameter('camp_id');
开发者ID:yasirgit,项目名称:afids,代码行数:67,代码来源:actions.class.php

示例4: executeInstrumentNotication

 public function executeInstrumentNotication(sfWebRequest $request)
 {
     $c = new Criteria();
     $c->add(PersonRolePeer::PERSON_ID, $this->getUser()->getId());
     $c->addJoin(PersonRolePeer::ROLE_ID, RoleNotificationPeer::ROLE_ID);
     $personNotification = RoleNotificationPeer::doSelect($c);
     $this->mid = 0;
     foreach ($personNotification as $key => $value) {
         $this->mid = $value->getMid();
         $this->notification = $value->getNotification();
         //5. person add
         if ($this->mid == 5 && ($this->notification == 2 || $this->notification == 3)) {
             $c = new Criteria();
             $c->addDescendingOrderByColumn(PersonPeer::ID);
             $c->setLimit(5);
             $this->newperson = PersonPeer::doSelect($c);
         }
     }
     $this->host = $request->getHost();
     $this->memberId = $this->getUser()->getMemberId();
     //$query = "SELECT COUNT(pilot_request.accepted) FROM pilot_request ";
     //$query .="WHERE pilot_request.accepted = 1 AND pilot_request.processed = 1 AND pilot_request.member_id = ".$this->memberId;
     //$con = Propel::getConnection();
     //$stmt = $con->prepare($query);
     //$stmt->execute();
     /*if($rs = $stmt->fetch(PDO::FETCH_NUM)) {
         $count = (int)$rs[0];
       }else{
         $count = 0;
       }*/
     $c = new Criteria();
     $c->add(PilotRequestPeer::ACCEPTED, 1);
     $c->add(PilotRequestPeer::PROCESSED, 1);
     $c->add(PilotRequestPeer::MEMBER_ID, $this->memberId);
     $this->totalAccepted = PilotRequestPeer::doCount($c);
     /* $this->memberId = $this->getUser()->getMemberId();
          $query = "SELECT COUNT(pilot_request.accepted) FROM pilot_request ";
          $query .="WHERE pilot_request.accepted = 0 AND pilot_request.member_id = $this->memberId";
          $con = Propel::getConnection();
          $stmt = $con->prepare($query);
          $stmt->execute();
     
          if($rs = $stmt->fetch(PDO::FETCH_NUM)) {
            $count = (int)$rs[0];
          }else{
            $count = 0;
          }*/
     $c = new Criteria();
     $c->add(PilotRequestPeer::ACCEPTED, 0);
     $c->add(PilotRequestPeer::MEMBER_ID, $this->memberId);
     $this->totaldeclined = PilotRequestPeer::doCount($c);
     $c = new Criteria();
     $c->add(MissionLegPeer::PILOT_ID, $this->getUser()->getPilotId());
     $c->add(MissionLegPeer::CANCEL_MISSION_LEG, 0);
     $this->totalMissionCancellation = MissionLegPeer::doCount($c);
     //total signup events count
     $pilot_id = $this->getUser()->getPilotId();
     if ($pilot_id) {
         $pilot = PilotPeer::retrieveByPK($pilot_id);
         $member_id = $pilot->getMemberId();
         $date = date('Y-m-d');
         $c = new Criteria();
         $c->add(EventReservationPeer::MEMBER_ID, $member_id, Criteria::EQUAL);
         $c->addJoin(EventPeer::ID, EventReservationPeer::EVENT_ID);
         $c->add(EventPeer::EVENT_DATE, $date, Criteria::GREATER_EQUAL);
         $this->totalSignupEvents = EventReservationPeer::doCount($c);
     }
     //
 }
开发者ID:yasirgit,项目名称:afids,代码行数:69,代码来源:components.class.php

示例5: retrieveByPKs

 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(PersonPeer::ID_PERSON, $pks, Criteria::IN);
         $objs = PersonPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
开发者ID:eburhan,项目名称:Propel-Criteria-Builder,代码行数:15,代码来源:BasePersonPeer.php

示例6: getNotInPilot

 public static function getNotInPilot()
 {
     $c = new Criteria();
     $pliots = PilotPeer::doSelect($c);
     if ($pliots) {
         foreach ($pliots as $pliot) {
             $c->addJoin(self::ID, PilotPeer::MEMBER_ID, Criteria::LEFT_JOIN);
             $c->addJoin(self::PERSON_ID, PersonPeer::ID);
             $c->add(PilotPeer::MEMBER_ID, null, Criteria::ISNULL);
             $not_in_pilot_persons = PersonPeer::doSelect($c);
         }
     } else {
         $not_in_pilot_persons = PersonPeer::doSelect($c);
     }
     $arr = array();
     $arr[0] = '-- select --';
     foreach ($not_in_pilot_persons as $not_in_pilot_person) {
         $arr[$not_in_pilot_person->getId()] = $not_in_pilot_person->getLastName();
     }
     return $arr;
 }
开发者ID:yasirgit,项目名称:afids,代码行数:21,代码来源:MemberPeer.php


注:本文中的PersonPeer::doSelect方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。