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


PHP DBLayer::close方法代码示例

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


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

示例1: isset

        $arr[$i]['cl'] = $result['class'];
        $arr[$i]['race'] = $result['race'];
        $arr[$i]['level'] = $char_data[$UNIT_FIELD_LEVEL];
        $arr[$i]['gender'] = $char_gender[3];
        $arr[$i]['Extention'] = $Extention;
        $arr[$i]['leaderGuid'] = isset($groups[$char_data[0]]) ? $groups[$char_data[0]] : 0;
        $i++;
    }
    $mangos_db->close();
    usort($arr, "sort_players");
    $arr = array_merge($Count, $arr);
    $res['online'] = $arr;
} else {
    $res['online'] = NULL;
}
if ($show_status) {
    $mangos_db = new DBLayer($mangos[$royaume]['host'], $mangos[$royaume]['user'], $mangos[$royaume]['password'], $mangos[$royaume]['db']);
    $mangos_db->query("SET NAMES " . $mangos[$royaume]['encoding'] . "");
    $query = $mangos_db->query("SELECT `starttime`,`maxplayers` FROM `uptime` WHERE `starttime`=(SELECT MAX(`starttime`) FROM `uptime`)");
    if ($result = $mangos_db->fetch_assoc($query)) {
        $status['uptime'] = time() - $result['starttime'];
        $status['maxplayers'] = $result['maxplayers'];
        $status['online'] = test_realm() ? 1 : 0;
    }
    $mangos_db->close();
} else {
    $status = NULL;
}
unset($mangos_db);
$res['status'] = $status;
$_RESULT = $res;
开发者ID:galathil,项目名称:coolwow2,代码行数:31,代码来源:map_core.php

示例2: isset

    $arr[$i]['gender'] = $result['gender'];
    $arr[$i]['Extention'] = $Extention;
    $arr[$i]['leaderGuid'] = isset($groups[$char_data[0]]) ? $groups[$char_data[0]] : 0;
    $i++;
}
$characters_db_PM->close();
unset($characters_db_PM);
if (!count($arr) && !test_realm()) {
    $res['online'] = NULL;
} else {
    usort($arr, "sort_players");
    $arr = array_merge($Count, $arr);
    $res['online'] = $arr;
}
if ($show_status) {
    $query = $arcm_db_PM->query("SELECT UNIX_TIMESTAMP(),`starttime`,`maxplayers` FROM `uptime` WHERE `starttime`=(SELECT MAX(`starttime`) FROM `uptime`)");
    if ($result = $arcm_db_PM->fetch_row($query)) {
        $status['online'] = test_realm() ? 1 : 0;
        $status['uptime'] = $result[0] - $result[1];
        $status['maxplayers'] = $result[2];
        $status['gmonline'] = $gm_online;
    } else {
        $status = NULL;
    }
} else {
    $status = NULL;
}
$arcm_db_PM->close();
unset($arcm_db_PM);
$res['status'] = $status;
$_RESULT = $res;
开发者ID:Refuge89,项目名称:World-of-Warcraft-Trinity-Core-MaNGOS,代码行数:31,代码来源:pomm_play.php

示例3: DBLayer

 function get_character_honor($char_id)
 {
     global $hostr, $userr, $passwordr, $db, $dbr, $dbc, $database_encoding;
     $mangos_db = new DBLayer($hostr, $userr, $passwordr, $dbc);
     $query = $mangos_db->query("SELECT * FROM `character_kill` WHERE `guid`='{$char_id}'");
     while ($res_row = $mangos_db->fetch_assoc($query)) {
         $honor += $res_row['honor'];
     }
     $mangos_db->close();
     return $honor;
 }
开发者ID:galathil,项目名称:coolwow2,代码行数:11,代码来源:fonctions.php

示例4: isset

    $arr[$i]['gender'] = $result['gender'];
    $arr[$i]['Extention'] = $Extention;
    $arr[$i]['leaderGuid'] = isset($groups[$char_data[0]]) ? $groups[$char_data[0]] : 0;
    $i++;
}
$characters_db->close();
unset($characters_db);
if (!count($arr) && !test_realm()) {
    $res['online'] = NULL;
} else {
    usort($arr, "sort_players");
    $arr = array_merge($Count, $arr);
    $res['online'] = $arr;
}
if ($show_status) {
    $query = $realm_db->query("SELECT UNIX_TIMESTAMP(),`starttime`,`maxplayers` FROM `uptime` WHERE `starttime`=(SELECT MAX(`starttime`) FROM `uptime`)");
    if ($result = $realm_db->fetch_row($query)) {
        $status['online'] = test_realm() ? 1 : 0;
        $status['uptime'] = $result[0] - $result[1];
        $status['maxplayers'] = $result[2];
        $status['gmonline'] = $gm_online;
    } else {
        $status = NULL;
    }
} else {
    $status = NULL;
}
$realm_db->close();
unset($realm_db);
$res['status'] = $status;
$_RESULT = $res;
开发者ID:scamp,项目名称:minimanager,代码行数:31,代码来源:pomm_play.php

示例5: DBLayer

<?php

require "subs.php";
require_once "conf.inc.php";
require_once "lib/dblayer.php";
$btn_home = "<a class='button' href='./'><<</a>";
$db = new DBLayer($CNF["db_host"], $CNF["db_user"], $CNF["db_pass"], $CNF["db_name"]);
$db->query("SET NAMES utf8");
$q = "SELECT\n                u.`uid`,\n                u.`modiff`,\n                DATE_FORMAT(u.`modiff`,'%d.%m.%Y %H:%i:%s') AS `modiff_fmt`,\n                (SELECT CONCAT(`lastname`,' ',`firstname`) FROM users WHERE `uid`=u.`modiff_uid`) AS `modiff_uid`,\n                u.`status_id`,\n                u.`lastname`,\n                u.`firstname`,\n                u.`middlename`,\n                u.`login`,\n                u.`pass`\n                         FROM users AS u ORDER BY `uid` DESC LIMIT 5";
if ($qry = $db->query($q)) {
    eval(tmplt_gen("stat/forms/begin.form"));
    eval(tmplt_gen("users/forms/filter.form"));
    while ($res = $db->fetch_assoc($qry)) {
        $page .= table_users($res);
    }
    $page .= "</table>";
    $page .= "<div class='table-footer'><span class='statusbar'>&nbsp;</span>";
} else {
    echo 'error';
}
//print_r($res);
echo $page;
$db_err = $db->error();
$db->close();
if ($db_err["error_no"] != null) {
    print_r($db_err);
}
// DB-errors
开发者ID:progervlad,项目名称:utils,代码行数:28,代码来源:test.php


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