當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ConnectionFactory::InsertIntoTableBasicReturnInsertID方法代碼示例

本文整理匯總了PHP中ConnectionFactory::InsertIntoTableBasicReturnInsertID方法的典型用法代碼示例。如果您正苦於以下問題:PHP ConnectionFactory::InsertIntoTableBasicReturnInsertID方法的具體用法?PHP ConnectionFactory::InsertIntoTableBasicReturnInsertID怎麽用?PHP ConnectionFactory::InsertIntoTableBasicReturnInsertID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ConnectionFactory的用法示例。


在下文中一共展示了ConnectionFactory::InsertIntoTableBasicReturnInsertID方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: createBounty

 public static function createBounty($requester_id, $target_id, $payment)
 {
     $bountyparams = array();
     $bountyparams['requester_id'] = $requester_id;
     $bountyparams['target_id'] = $target_id;
     $bountyparams['payment'] = $payment;
     $justInsertID = ConnectionFactory::InsertIntoTableBasicReturnInsertID("bounties", $bountyparams);
     if ($justInsertID) {
         return self::getBounty($justInsertID);
     }
     return NULL;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:12,代碼來源:Bounty.php

示例2: createUserMissionData

 public static function createUserMissionData($userID, $missionID)
 {
     $umdParams = array();
     $umdParams['user_id'] = $userID;
     $umdParams['mission_id'] = $missionID;
     $umdParams['times_complete'] = 1;
     $umdParams['rank_one_times'] = 1;
     $umdParams['curr_rank'] = 1;
     $justInsertID = ConnectionFactory::InsertIntoTableBasicReturnInsertID("users_missions", $umdParams);
     if ($justInsertID) {
         return self::getUserMissionData($userID, $missionID);
     }
     return NULL;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:14,代碼來源:UserMissionData.php

示例3: createUser

 public static function createUser($name)
 {
     $userparams = array();
     $userparams['name'] = $name;
     $justAddedID = ConnectionFactory::InsertIntoTableBasicReturnInsertID("users", $userparams);
     if ($justAddedID) {
         $usercitiesparams = array();
         $usercitiesparams['user_id'] = $justAddedID;
         $usercitiesparams['city_id'] = 1;
         $usercitiesparams['rank_avail'] = 1;
         $success = ConnectionFactory::InsertIntoTableBasic("users_cities", $usercitiesparams);
         if ($success) {
             return self::getUser($justAddedID);
         }
     }
     return NULL;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:17,代碼來源:User.php

示例4: createUserUdid

 public static function createUserUdid($uuid, $os, $mac)
 {
     $soldierCode = new SoldierCode();
     $code = SoldierCode::getSoldierCode();
     if ($code[0]->getCode() == "") {
         $code = SoldierCode::getSoldierCode();
         if ($code[0]->getCode() == "") {
             $code = SoldierCode::getSoldierCode();
         }
     }
     $userparams = array();
     $userparams['udid'] = $uuid;
     $userparams['soldier_code'] = $code[0]->getCode();
     $userparams['device_os'] = $os;
     $userparams['device_mac'] = $mac;
     $userparams['diamonds'] = 10;
     // setting max experience points for first level
     $userparams['next_level_experince_points'] = 15;
     $justAddedID = ConnectionFactory::InsertIntoTableBasicReturnInsertID("users", $userparams);
     if ($justAddedID) {
         $usercitiesparams = array();
         $usertimerparams = array();
         $success = '';
         $timer_success = '';
         /*
          * Inserting User cities with rank
          * Currently we are dealing with 4 cities so loop iterates 4 times
          */
         for ($i = 1; $i <= 4; $i++) {
             $usercitiesparams['user_id'] = $justAddedID;
             $usercitiesparams['city_id'] = $i;
             $usercitiesparams['rank_avail'] = 1;
             $success = ConnectionFactory::InsertIntoTableBasic("users_cities", $usercitiesparams);
         }
         $usertimerparams['user_id'] = $justAddedID;
         $timer_success = ConnectionFactory::InsertIntoTableBasic("user_timers", $usertimerparams);
         $achievement['user_id'] = $justAddedID;
         $success = ConnectionFactory::InsertIntoTableBasic("users_achievements", $achievement);
         if ($success && $timer_success) {
             if ($soldierCode->deleteCode($code[0]->getCode())) {
                 return self::getUser($justAddedID);
             }
         }
     }
     return NULL;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:46,代碼來源:User.php


注:本文中的ConnectionFactory::InsertIntoTableBasicReturnInsertID方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。