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


PHP Base_Common::getUserDataPositionByName方法代码示例

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


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

示例1: resetMail

 public function resetMail($UserId)
 {
     $this->db->begin();
     $UserCommunication = $this->GetUserCommunication($UserId);
     $UserMail = $UserCommunication['UserMail'];
     $updateMail = $this->updateUserCommunication($UserId, array('UserMail' => ''));
     $position = Base_Common::getUserDataPositionByName($UserMail);
     $table_to_delete = Base_Common::getUserTable($this->table_mail, $position);
     $deleteMail = $this->db->delete($table_to_delete, '`UserId`=? and `UserMail`=?', array($UserId, $UserMail));
     if ($updateMail && $deleteMail) {
         $this->db->commit();
         return true;
     } else {
         $this->db->rollback();
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:17,代码来源:User.php

示例2: getCharacterInfoByCharacter

 public function getCharacterInfoByCharacter($CharacterName, $ServerId, $fields = '*')
 {
     $position = Base_Common::getUserDataPositionByName($CharacterName);
     $table_to_process = Base_Common::getUserTable($this->table_character, $position);
     if ($ServerId) {
         $sql = "select {$fields} from {$table_to_process} where `CharacterName` = ? and `ServerId` = ?";
         return $this->db->getAll($sql, array($CharacterName, $ServerId));
     } else {
         $sql = "select {$fields} from {$table_to_process} where `CharacterName` = ?";
         return $this->db->getAll($sql, $CharacterName);
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:12,代码来源:Character.php

示例3: LogoutByTime

 public function LogoutByTime($DataArr, $UserName)
 {
     $this->db->begin();
     $Date = date("Ym", $DataArr['LoginTime']);
     $bind = array('LogoutTime' => $DataArr['LogoutTime']);
     $LoginTime = $DataArr['LoginTime'];
     unset($DataArr['LoginTime']);
     $table_to_update = Base_Widget::getDbTable($this->table_date);
     $table_to_update .= "_" . $Date;
     $param = array($DataArr['UserId'], $DataArr['ServerId'], $LoginTime);
     $date = $this->db->update($table_to_update, $bind, '`LogoutTime` = 0 and `UserId` = ? and `ServerId` = ? and `LoginTime` = ?', $param);
     $position = Base_Common::getUserDataPositionByName($UserName);
     $table_to_update = Base_Widget::getDbTable($this->table_user) . "_" . $position['db_fix'];
     $user = $this->db->update($table_to_update, $bind, '`LogoutTime` = 0 and `UserId` = ? and `ServerId` = ? and `LoginTime` = ?', $param);
     if ($date && $user) {
         $this->db->commit();
         $LoginLog = $this->getLoginLogByTime($DataArr['UserId'], $DataArr['ServerId'], $LoginTime);
         $LoginLog['LoginId'] = $LoginLog['LoginId'] . $Date;
         $last_table = Base_Widget::getDbTable($this->table_last);
         $last = $this->db->replace($last_table, $LoginLog);
         $Online = $this->getLogOnlineDate($LoginLog);
         return true;
     } else {
         $this->db->rollback();
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:27,代码来源:Login.php

示例4: DelUserMailAndCommunication

 public function DelUserMailAndCommunication($UserArr)
 {
     $table_communication = "user_info_communication";
     $table_mail = "user_mail";
     $delCommunicationCount = $delMailCount = 0;
     $UpComCount = $UpMailCount = 0;
     $table_to_update = Base_Widget::getDbTable($this->table_del);
     $CommunicationArr = array("Communication" => 1);
     $MailArr = array("Mail" => 1);
     foreach ($UserArr as $k => $v) {
         $position = Base_Common::getUserDataPositionByName($v["UserName"]);
         $table_to_communication = Base_Common::getUserTable($table_communication, $position);
         $sql = "SELECT UserMail from {$table_to_communication} WHERE `UserId`=" . $v["UserId"];
         $Usermail = $this->db->getOne($sql);
         if ($Usermail) {
             //user_mail表是通过mail来定位的
             $position = Base_Common::getUserDataPositionByName($Usermail);
             $table_to_mail = Base_Common::getUserTable($table_mail, $position);
             if ($this->db->delete($table_to_mail, '`UserId` = ?', $v["UserId"])) {
                 if ($this->db->update($table_to_update, $MailArr, '`UserId` = ?', $v["UserId"])) {
                     $UpMailCount++;
                 }
                 $delMailCount++;
             }
         }
         if ($this->db->delete($table_to_communication, '`UserId` = ?', $v["UserId"])) {
             if ($this->db->update($table_to_update, $CommunicationArr, '`UserId` = ?', $v["UserId"])) {
                 $UpComCount++;
             }
             $delCommunicationCount++;
         }
     }
     return array("DelMailCount" => $delMailCount, "DelCommunicationCount" => $delCommunicationCount, "UpMailCount" => $UpMailCount, "UpComCount" => $UpComCount);
 }
开发者ID:eappl,项目名称:prototype,代码行数:34,代码来源:DB1.php


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