本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: getItem
public static function getItem($itemID)
{
$objItem = ConnectionFactory::SelectRowAsClass("SELECT * FROM items where id = :itemID", array("itemID" => $itemID), __CLASS__);
return $objItem;
}
示例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;
}
示例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;
}
示例7: getBounty
public static function getBounty($bountyID)
{
$objBounty = ConnectionFactory::SelectRowAsClass("SELECT * FROM bounties where id = :bountyID", array("bountyID" => $bountyID), __CLASS__);
return $objBounty;
}
示例8: getUser
public static function getUser($userID)
{
$objUser = ConnectionFactory::SelectRowAsClass("SELECT * FROM users where id = :userID", array("userID" => $userID), __CLASS__);
return $objUser;
}
示例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;
}
示例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__);
}
示例11: getRealEstate
public static function getRealEstate($realEstateID)
{
$objRE = ConnectionFactory::SelectRowAsClass("SELECT * FROM realestate where id = :realEstateID", array("realEstateID" => $realEstateID), __CLASS__);
return $objRE;
}
示例12: getMission
public static function getMission($missionID)
{
$objMission = ConnectionFactory::SelectRowAsClass("SELECT * FROM missions where id = :missionID", array("missionID" => $missionID), __CLASS__);
return $objMission;
}
示例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;
}