本文整理汇总了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;
}
示例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;
}
示例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;
}
}
示例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;
}
示例5: insertCode
public function insertCode($soldierCode)
{
$params['code'] = $soldierCode;
$query = ConnectionFactory::InsertIntoTableBasic("soldier_code_backup", $params);
return $query;
}
示例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;
}