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


PHP ConnectionFactory::InsertIntoTableBasic方法代碼示例

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


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

示例1: postComment

 /**
  * To post the comment
  * @param The user who have posted the comment $senderID
  * @param The user to which comment was posted $receiverID
  * @param The content of the comment $content
  * @return boolean
  */
 public static function postComment($senderID, $receiverID, $content, $time)
 {
     $comment = array();
     $comment['sender_id'] = $senderID;
     $comment['receiver_id'] = $receiverID;
     $comment['comments'] = $content;
     //$comment['time_posted'] = 'NOW()';
     $success = ConnectionFactory::InsertIntoTableBasic("comments", $comment);
     return $success;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:17,代碼來源:Comments.php

示例2: addPurchasedDiamond

 public static function addPurchasedDiamond($udid, $amount, $diamonds, $product_id, $transaction_id, $purchase_date, $app_item_id, $quantity, $bid, $bvrs, $valid_request, $level)
 {
     $diamond_purchased_history = array();
     $diamond_purchased_history['udid'] = $udid;
     $diamond_purchased_history['amount'] = floatval($amount);
     $diamond_purchased_history['diamonds'] = $diamonds;
     $diamond_purchased_history['product_id'] = $product_id;
     $diamond_purchased_history['transaction_id'] = $transaction_id;
     $diamond_purchased_history['purchase_date'] = $purchase_date;
     $diamond_purchased_history['app_item_id'] = $app_item_id;
     $diamond_purchased_history['quantity'] = $quantity;
     $diamond_purchased_history['bid'] = $bid;
     $diamond_purchased_history['bvrs'] = $bvrs;
     $diamond_purchased_history['valid_request'] = $valid_request;
     $diamond_purchased_history['level'] = $level;
     $success = ConnectionFactory::InsertIntoTableBasic("diamond_purchased_history", $diamond_purchased_history);
     return $success;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:18,代碼來源:DiamondPurchasedHistory.php

示例3: insertCode

 public function insertCode($soldierCode)
 {
     $params['code'] = $soldierCode;
     $query = ConnectionFactory::InsertIntoTableBasic("soldier_code", $params);
     if ($query == 1) {
         $backupSoldierCode = new SoldierCodeBackup();
         if (!$backupSoldierCode->backupCodeExist($soldierCode)) {
             if ($backupSoldierCode->insertCode($soldierCode)) {
                 return true;
             } else {
                 deleteCode($soldierCode);
                 return false;
             }
         } else {
             deleteCode($soldierCode);
             return false;
         }
     } else {
         return false;
     }
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:21,代碼來源:SoldierCode.php

示例4: 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

示例5: insertCode

 public function insertCode($soldierCode)
 {
     $params['code'] = $soldierCode;
     $query = ConnectionFactory::InsertIntoTableBasic("soldier_code_backup", $params);
     return $query;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:6,代碼來源:SoldierCodeBackup.php

示例6: postBroadcastMessage

 public function postBroadcastMessage($content)
 {
     $params = array();
     $params['sender_id'] = $this->id;
     $params['content'] = $content;
     //$params['time_posted'] = strftime('%c');
     $success = ConnectionFactory::InsertIntoTableBasic("broadcast", $params);
     return $success;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:9,代碼來源:User.php


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