当前位置: 首页>>代码示例>>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;未经允许,请勿转载。