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


PHP ConnectionFactory::SelectRowAsClass方法代碼示例

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


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

示例1: getCity

 public static function getCity($cityID)
 {
     $objCity = Lvl6MemCache::getCache('city' . $cityID);
     if ($objCity) {
         return $objCity;
     }
     $objCity = ConnectionFactory::SelectRowAsClass("SELECT * FROM cities where id = :cityID", array("cityID" => $cityID), __CLASS__);
     Lvl6MemCache::addCache('city' . $cityID, $objCity);
     return $objCity;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:10,代碼來源:Cities.php

示例2: getLevelExp

 public static function getLevelExp($levelID)
 {
     $objItem = Lvl6MemCache::getCache('levelExp' . $levelID);
     if ($objItem) {
         return $objItem;
     }
     $objItem = ConnectionFactory::SelectRowAsClass("SELECT required_experience_points FROM level_experience_points where level_id = :levelID", array("levelID" => $levelID), __CLASS__);
     Lvl6MemCache::addCache('levelExp' . $levelID, $objItem);
     return $objItem;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:10,代碼來源:LevelExperiencePoints.php

示例3: getRealEstate

 public static function getRealEstate($realEstateID)
 {
     $objRE = Lvl6MemCache::getCache('realEstate' . $realEstateID);
     if ($objRE) {
         return $objRE;
     }
     $objRE = ConnectionFactory::SelectRowAsClass("SELECT * FROM realestate where id = :realEstateID", array("realEstateID" => $realEstateID), __CLASS__);
     Lvl6MemCache::addCache('realEstate' . $realEstateID, $objRE);
     return $objRE;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:10,代碼來源:RealEstate.php

示例4: getItem

 public static function getItem($itemID)
 {
     $objItem = ConnectionFactory::SelectRowAsClass("SELECT * FROM items where id = :itemID", array("itemID" => $itemID), __CLASS__);
     return $objItem;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:5,代碼來源:Item.php

示例5: getNextUnlockMissionLevel

 public static function getNextUnlockMissionLevel($playerLevel, $currentCityID)
 {
     $objItem = Lvl6MemCache::getCache('nextUnlockMissionLevel' . $playerLevel . $currentCityID);
     if ($objItem) {
         return $objItem;
     }
     $query = "SELECT * FROM missions WHERE min_level > ? AND city_id = ? ORDER BY min_level";
     $objItem = ConnectionFactory::SelectRowAsClass($query, array($playerLevel, $currentCityID), __CLASS__);
     Lvl6MemCache::addCache('nextUnlockMissionLevel' . $playerLevel . $currentCityID, $objItem);
     return $objItem;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:11,代碼來源:Mission.php

示例6: getNextUnlockWeaponLevel

 public static function getNextUnlockWeaponLevel($playerLevel)
 {
     $objItem = Lvl6MemCache::getCache('nextUnlockWeaponLeve' . $playerLevel);
     if ($objItem) {
         return $objItem;
     }
     $query = "SELECT * FROM items WHERE min_level > ? ORDER BY min_level";
     $objItem = ConnectionFactory::SelectRowAsClass($query, array($playerLevel), __CLASS__);
     Lvl6MemCache::addCache('nextUnlockWeaponLeve' . $playerLevel, $objItem);
     return $objItem;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:11,代碼來源:Item.php

示例7: getBounty

 public static function getBounty($bountyID)
 {
     $objBounty = ConnectionFactory::SelectRowAsClass("SELECT * FROM bounties where id = :bountyID", array("bountyID" => $bountyID), __CLASS__);
     return $objBounty;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:5,代碼來源:Bounty.php

示例8: getUser

 public static function getUser($userID)
 {
     $objUser = ConnectionFactory::SelectRowAsClass("SELECT * FROM users where id = :userID", array("userID" => $userID), __CLASS__);
     return $objUser;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:5,代碼來源:User.php

示例9: getUserMissionData

 public static function getUserMissionData($userID, $missionID)
 {
     $objData = ConnectionFactory::SelectRowAsClass("SELECT * FROM users_missions where user_id = ? and mission_id= ?", array($userID, $missionID), __CLASS__);
     return $objData;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:5,代碼來源:UserMissionData.php

示例10: getTimersInSeconds

 public static function getTimersInSeconds($user_id)
 {
     $query = "SELECT TIMESTAMPDIFF(SECOND, income_timer, NOW()) as income_timer, TIMESTAMPDIFF(SECOND, health_timer, NOW()) as health_timer,\n                TIMESTAMPDIFF(SECOND, energy_timer, NOW()) as energy_timer, TIMESTAMPDIFF(SECOND, stamina_timer, NOW()) as stamina_timer FROM user_timers Where user_id = :userID";
     return ConnectionFactory::SelectRowAsClass($query, array("userID" => $user_id), __CLASS__);
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:5,代碼來源:UserTimers.php

示例11: getRealEstate

 public static function getRealEstate($realEstateID)
 {
     $objRE = ConnectionFactory::SelectRowAsClass("SELECT * FROM realestate where id = :realEstateID", array("realEstateID" => $realEstateID), __CLASS__);
     return $objRE;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:5,代碼來源:RealEstate.php

示例12: getMission

 public static function getMission($missionID)
 {
     $objMission = ConnectionFactory::SelectRowAsClass("SELECT * FROM missions where id = :missionID", array("missionID" => $missionID), __CLASS__);
     return $objMission;
 }
開發者ID:ng2k12,項目名稱:MercenaryInc,代碼行數:5,代碼來源:Mission.php

示例13: updateLevel

 public function updateLevel($level, $skillPointsGained)
 {
     $absParams = array();
     $absParams['level'] = $level;
     $relParams = array();
     $relParams['skill_points'] = $skillPointsGained;
     $conditions = array();
     $conditions['id'] = $this->id;
     $objItem = ConnectionFactory::SelectRowAsClass("SELECT required_experience_points FROM level_experience_points where level_id = :levelID", array("levelID" => $level + 1), __CLASS__);
     $nextRequiredExp = $objItem->required_experience_points;
     $absParams['next_level_experince_points'] = $nextRequiredExp;
     $success = ConnectionFactory::updateTableRowGenericBasic("users", $absParams, $relParams, $conditions);
     if ($success) {
         $this->level = $level;
         $this->skill_points += $skillPointsGained;
     }
     return $success;
 }
開發者ID:ng2k12,項目名稱:MercInc,代碼行數:18,代碼來源:User.php


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