当前位置: 首页>>代码示例>>PHP>>正文


PHP ConnectionFactory::SelectValue方法代码示例

本文整理汇总了PHP中ConnectionFactory::SelectValue方法的典型用法代码示例。如果您正苦于以下问题:PHP ConnectionFactory::SelectValue方法的具体用法?PHP ConnectionFactory::SelectValue怎么用?PHP ConnectionFactory::SelectValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConnectionFactory的用法示例。


在下文中一共展示了ConnectionFactory::SelectValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: transactionIdExists

 public static function transactionIdExists($transaction_id)
 {
     $conditions = array();
     $conditions['transaction_id'] = $transaction_id;
     $success = ConnectionFactory::SelectValue("transaction_id", "diamond_purchased_history", $conditions);
     return $success;
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:7,代码来源:DiamondPurchasedHistory.php

示例2: completeMission

 public function completeMission($mission)
 {
     $completeParams = array();
     $completeParams['times_complete'] = 1;
     $this->times_complete++;
     $cityRank = ConnectionFactory::SelectValue("rank_avail", "users_cities", array("user_id" => $this->user_id, "city_id" => $mission->getCityID()));
     switch ($cityRank) {
         case 1:
             $completeParams['rank_one_times'] = 1;
             $this->rank_one_times++;
             break;
         case 2:
             $completeParams['rank_two_times'] = 1;
             $this->rank_two_times++;
             break;
         case 3:
             $completeParams['rank_three_times'] = 1;
             $this->rank_three_times++;
             break;
     }
     $currRank = $this->curr_rank;
     $userTimesFinishedRankForMission = $this->getRankTimes($currRank);
     /*
     		if ($cityRank == $currRank) {	//this is cause we need to incorporate changes above
     			$userTimesFinishedRankForMission++;		//that have not hit db yet
     		}
     */
     $missionRequirementToFinishRank = $mission->getRankReqTimes($currRank);
     $unlockedMissionRank = false;
     if ($userTimesFinishedRankForMission >= $missionRequirementToFinishRank) {
         if ($userTimesFinishedRankForMission == $missionRequirementToFinishRank) {
             if ($currRank <= 3) {
                 $_SESSION['justUnlockedThisMissionRank'] = $currRank + 1;
                 $_SESSION['justUnlockedRankMissionName'] = $mission->getName();
                 $unlockedMissionRank = true;
                 $completeParams['curr_rank'] = 1;
                 $this->curr_rank++;
             } else {
                 return;
             }
         }
     }
     $cityID = $mission->getCityID();
     $success = ConnectionFactory::updateTableRowRelativeBasic("users_missions", $completeParams, array("user_id" => $this->user_id, "mission_id" => $mission->getID()));
     if ($unlockedMissionRank && $this->allMissionsInCityReadyForNextLevel($currRank + 1, $cityID, $this->user_id)) {
         if (!ConnectionFactory::updateTableRowAbsoluteBasic("users_cities", array("rank_avail" => $currRank + 1), array("user_id" => $this->user_id, "city_id" => $cityID))) {
             redirect($GLOBALS['serverRoot'] . "/errorpage.html");
         }
         $_SESSION['justUnlockedThisCityRank'] = $currRank + 1;
         $_SESSION['justUnlockedRankMissionName'] = $mission->getName();
     }
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:52,代码来源:UserMissionData.php

示例3: getQuanitybyUserId

 public function getQuanitybyUserId($userID)
 {
     $conditions = array();
     $conditions['item_id'] = $this->id;
     $conditions['user_id'] = $userID;
     $quantity = ConnectionFactory::SelectValue('quantity', 'users_items', $conditions);
     //echo $quantity;
     //die;
     if ($quantity) {
         return $quantity;
     }
     return 0;
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:13,代码来源:Item.php

示例4: DbConnect

    }
}
// CREATE DATABASE OBJECT ( MAKE SURE TO CHANGE LOGIN INFO IN CLASS FILE )
$db = new DbConnect();
$db->show_errors();
// FETCH $_GET OR CRON ARGUMENTS TO AUTOMATE TASKS
$apns = new APNS($db);
/**
/*	ACTUAL SAMPLES USING THE 'Examples of JSON Payloads' EXAMPLES (1-5) FROM APPLE'S WEBSITE.
*	LINK:  http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/ApplePushService/ApplePushService.html#//apple_ref/doc/uid/TP40008194-CH100-SW15
*/
$inactiveUsers = User::lastTwoDayInactive();
foreach ($inactiveUsers as $user) {
    $conditions = array();
    $conditions['deviceuid'] = $user['udid'];
    $userPid = ConnectionFactory::SelectValue('pid', 'apns_devices', $conditions);
    if ($userPid > 0) {
        $apns->newMessage($userPid);
        $apns->addMessageAlert("You didn'nt login from last two days");
        $apns->queueMessage();
    }
    //    die;
}
die;
$apns->newMessage(1);
$apns->addMessageAlert('Message received from Waseem2');
$apns->queueMessage();
$apns->newMessage(2);
$apns->addMessageAlert('Message received from Waseem2');
$apns->queueMessage();
die;
开发者ID:ng2k12,项目名称:MercInc,代码行数:31,代码来源:sample.php

示例5: getUserLevel

 public static function getUserLevel($udid)
 {
     $conditions = array();
     $conditions['udid'] = $udid;
     $success = ConnectionFactory::SelectValue("level", "users", $conditions);
     return $success;
 }
开发者ID:ng2k12,项目名称:MercInc,代码行数:7,代码来源:User.php


注:本文中的ConnectionFactory::SelectValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。