本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}