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


PHP Base_Common::getUserTable方法代码示例

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


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

示例1: InsertCharacterKickOff

 public function InsertCharacterKickOff($KickOffArr)
 {
     $this->db->begin();
     $position = Base_Common::getUserDataPositionById($KickOffArr['UserId']);
     $table_user = Base_Common::getUserTable($this->character_kick_off, $position);
     $user = $this->db->insert($table_user, $KickOffArr);
     $Date = date("Ym", $KickOffArr['KickOffTime']);
     $table_date = $this->CreateCharacterKickOffLog($Date);
     $oSocketType = @(include __APP_ROOT_DIR__ . "/etc/SocketType.php");
     $oSocketQueue = new Config_SocketQueue();
     $uType = 60221;
     $TypeInfo = $oSocketType[$uType];
     if ($TypeInfo['Type']) {
         $DataArr = array('PackFormat' => $TypeInfo['PackFormat'], 'Length' => $TypeInfo['Length'], 'Length2' => 0, 'uType' => $uType, 'MsgLevel' => 0, 'Line' => 0, 'UserID' => $KickOffArr['UserId'], 'KickOffReason' => $KickOffArr['KickOffReason'], 'Serial' => $KickOffArr['KickOffId']);
     }
     $DataArr = array('ServerId' => $KickOffArr['ServerId'], 'uType' => $uType, 'UserId' => $DataArr['UserID'], 'MessegeContent' => serialize($DataArr), 'QueueTime' => time(), 'SendTime' => 0);
     $addQueue = $oSocketQueue->insert($DataArr);
     $log = $this->db->insert($table_date, $KickOffArr);
     if ($user && $log && $addQueue) {
         $this->db->commit();
         return true;
     } else {
         $this->db->rollBack();
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:26,代码来源:User.php

示例2: getItemPickUpCount

 public function getItemPickUpCount($StartTime, $EndTime, $UserId, $ServerId, $oWherePartnerPermission, $ItemListText)
 {
     //查询列
     $select_fields = array('PickUpCount' => 'count(*)');
     //初始化查询条件
     $whereStartTime = $StartTime ? " ItemPickUpTime >= '" . strtotime($StartTime) . "' " : "";
     $whereEndTime = $EndTime ? " ItemPickUpTime <= '" . strtotime($EndTime) . "' " : "";
     $whereServer = $ServerId ? " ServerId = " . $ServerId . " " : "";
     $whereItemID = $ItemListText ? " ItemID in ( " . $ItemListText . " )" : "";
     $whereUser = $UserId ? " UserId = " . $UserId . " " : "";
     $whereCondition = array($whereStartTime, $whereEndTime, $whereUser, $whereServer, $oWherePartnerPermission, $whereItemID);
     //生成查询列
     $fields = Base_common::getSqlFields($select_fields);
     //生成条件列
     $where = Base_common::getSqlWhere($whereCondition);
     if ($UserId) {
         $position = Base_Common::getUserDataPositionById($UserId);
         $table_to_process = Base_Common::getUserTable($this->table_list['pickitem_user'], $position);
     } else {
         $Date = date("Ymd", strtotime($StartTime));
         $table_to_process = Base_Widget::getDbTable($this->table_list['pickitem']) . "_" . $Date;
     }
     $sql = "SELECT {$fields} FROM {$table_to_process} as log where 1 " . $where;
     $PickUpCount = $this->db->getOne($sql, false);
     if ($PickUpCount) {
         return $PickUpCount;
     } else {
         return 0;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:30,代码来源:Item.php

示例3: getPvpLogTotal

 public function getPvpLogTotal($whereTime)
 {
     $table_to_process = Base_Widget::getDbTable($this->table_pvp_log_total);
     $sql = "truncate {$table_to_process}";
     $this->db->query($sql);
     for ($i = 0; $i <= 255; $i++) {
         $position = Base_Common::getUserDataPositionById(sprintf("%03d", $i));
         $table_to_get = Base_Common::getUserTable($this->table_pvp_log_user, $position);
         $sql = "replace into {$table_to_process} (ServerId,UserId,Won,PvpCount) select ServerId,UserId,Won,Count(*) from {$table_to_get} where {$whereTime} group by ServerId,UserId,Won";
         echo $this->db->query($sql) . "-";
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:12,代码来源:Task.php

示例4: asignProductPackCode

 public function asignProductPackCode($UserName, $unsignedCode)
 {
     $oUser = new Lm_User();
     $UserInfo = $oUser->getUserByName($UserName);
     if ($UserInfo['UserId']) {
         if ($unsignedCode['ProductPackCode']) {
             $PackInfo = $this->getRow($unsignedCode['ProductPackId']);
             $CodeCount = $this->getUserProductPackCodeListCount($UserInfo['UserId'], 0, 0, $unsignedCode['GenId']);
             if ($CodeCount < $PackInfo['AsignCountLimit']) {
                 $this->db->begin();
                 $unsignedCode['AsignTime'] = time();
                 $unsignedCode['AsignUser'] = $UserInfo['UserId'];
                 $position = Base_Common::getUserDataPositionById($UserInfo['UserId']);
                 $table_user = Base_Common::getUserTable($this->table_code, $position);
                 $user = $this->db->replace($table_user, $unsignedCode);
                 $table_code = Base_Widget::getDbTable($this->table_code);
                 $bind = $unsignedCode;
                 unset($bind['ProductPackCode']);
                 $code = $this->db->update($table_code, $bind, '`ProductPackCode` = ?', $unsignedCode['ProductPackCode']);
                 if ($code && $user) {
                     $this->db->commit();
                     return true;
                 } else {
                     $this->db->rollback();
                     return false;
                 }
             } else {
                 return false;
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:eappl,项目名称:prototype,代码行数:36,代码来源:Pack.php

示例5: getSendErrorList

 public function getSendErrorList($UserId, $SendId, $fields = '*')
 {
     $position = Base_Common::getUserDataPositionById($UserId);
     $table_user = Base_Common::getUserTable($this->table_send_log_user, $position);
     $sql = "select {$fields} from {$table_user} where `SendStatus` = 2 and `UserId` = ? and `SendId` = ?";
     return $this->db->getAll($sql, array($UserId, $SendId));
 }
开发者ID:eappl,项目名称:prototype,代码行数:7,代码来源:Character.php

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