Exemple #1
0
 /**
  * If this object constructed with a valid Id then load from the DB
  * @return boolean TRUE on success, FALSE on failure - mErrors will contain reason for failure
  */
 public function load()
 {
     $ret = parent::load();
     if ($ret && isset($this->mInfo['country_id'])) {
         $this->mFields = BitAddress::setupFields($this->mInfo['country_id']);
     }
     return $ret;
 }
Exemple #2
0
 /**
  * If this object constructed with a valid Id then load from the DB
  * @return boolean TRUE on success, FALSE on failure - mErrors will contain reason for failure
  */
 public function load()
 {
     $ret = parent::load();
     if ($ret) {
         $tblidnames = array(self::ALTNAME_TBL => 'altname_id', self::EMAIL_TBL => 'email_id', self::PHONE_TBL => 'phone_id', self::ADDRESS_TBL => 'address_id');
         $bindVars = array($this->mId);
         foreach ($tblidnames as $table => $idfield) {
             $query = "\n\t\t\t\t\tSELECT d.`" . $idfield . "` as `hash_key`, d.*\n\t\t\t\t\tFROM `" . BIT_DB_PREFIX . $table . "` d\n\t\t\t\t\tWHERE (d.`person_id` = ?) ";
             $this->mInfo[$table] = $this->mDb->getAssoc($query, $bindVars);
         }
     }
     return $ret;
 }