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


PHP DatabaseManager::get方法代码示例

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


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

示例1: delete_chardb_records

 function delete_chardb_records()
 {
     if (empty($this->data['id'])) {
         return false;
     }
     $id = $this->data['id'];
     $queries = array("DELETE FROM `account_data` WHERE `id`= {$id};", "DELETE FROM `account_instance_times` WHERE `id`= {$id};", "DELETE FROM `account_tutorial` WHERE `id`= {$id};");
     DatabaseManager::get('char')->queue->add_range($queries);
     return true;
 }
开发者ID:reddragon010,项目名称:RG-DBCleaner,代码行数:10,代码来源:account.php

示例2: delete

 function delete()
 {
     if (empty($this->data['guid'])) {
         return false;
     }
     $queries = array();
     $charGUID = $this->data['guid'];
     $queries[] = "DELETE FROM `arena_team_member` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `auctionhouse` WHERE `auctioneerguid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_account_data` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_achievement` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_achievement_progress` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_action` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_arena_stats` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_aura` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_banned` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_battleground_data` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_battleground_random` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_equipmentsets` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_gifts` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_glyphs` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_homebind` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_instance` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_inventory` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_questatus` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_questatus_daily` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_questatus_rewarded` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_questatus_weekly` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_reputation` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_skills` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_social` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_spell` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_spell_cooldown` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_stats` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `character_talent` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `characters` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `corpse` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `gm_tickets` WHERE `guid`= {$charGUID};";
     $queries[] = "DELETE FROM `group_member` WHERE `memberGuid`= {$charGUID};";
     $queries[] = "DELETE FROM `groups` WHERE `leaderGuid`= {$charGUID};";
     $queries[] = "DELETE FROM `item_instance` WHERE `owner_guid`= {$charGUID};";
     $queries[] = "DELETE FROM `item_refund_instance` WHERE `player_guid`= {$charGUID};";
     $queries[] = "DELETE FROM `mail` WHERE `receiver`= {$charGUID};";
     $queries[] = "DELETE FROM `mail_items` WHERE `receiver`= {$charGUID};";
     $queries[] = "DELETE FROM `petition` WHERE `ownerguid`= {$charGUID};";
     $queries[] = "DELETE FROM `petition_sign` WHERE `ownerguid`= {$charGUID};";
     $queries[] = "DELETE FROM `rg_characters_data` WHERE `guid`= {$charGUID};";
     $db = DatabaseManager::get('char')->queue->add_range($queries);
     return $this->delete_pets();
 }
开发者ID:reddragon010,项目名称:RG-DBCleaner,代码行数:50,代码来源:character.php

示例3: array

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <?php 
require 'autoloader.php';
Autoloader::register();
Config::load(array('dbconfig' => array('char' => array('user' => 'root', 'pass' => '', 'dsn' => 'mysql:host=127.0.0.1;dbname=characters'), 'auth' => array('user' => 'root', 'pass' => '', 'dsn' => 'mysql:host=127.0.0.1;dbname=auth'))));
$accounts = Account::select('id = 1');
foreach ($accounts as $account) {
    $account->delete();
}
DatabaseManager::get('auth')->queue->execute();
DatabaseManager::get('char')->queue->execute();
?>
    </body>
</html>
开发者ID:reddragon010,项目名称:RG-DBCleaner,代码行数:20,代码来源:index.php


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