partition.class.php

来自「phpMyAdmin图形界面化操作,我已经配置好了,只要把解要压缩后的文件放到站」· PHP 代码 · 共 56 行

PHP
56
字号
<?php/* vim: set expandtab sw=4 ts=4 sts=4: *//** * Library for extracting information about the partitions * * @version $Id: Partition.class.php 11582 2008-09-10 16:53:28Z lem9 $ *//** * base Partition Class */class PMA_Partition{    /**     * returns array of partition names for a specific db/table      *     * @access  public     * @uses    PMA_DBI_fetch_result()     * @return  array   of partition names     */    static public function getPartitionNames($db, $table)    {        if (PMA_Partition::havePartitioning()) {            return PMA_DBI_fetch_result("select `PARTITION_NAME` from `information_schema`.`PARTITIONS` where `TABLE_SCHEMA` = '" . $db . "' and `TABLE_NAME` = '" . $table . "'");        } else {            return array();        }    }    /**     * checks if MySQL server supports partitioning      *     * @static     * @staticvar boolean $have_partitioning     * @staticvar boolean $already_checked     * @access  public     * @uses    PMA_DBI_fetch_result()     * @return  boolean      */    static public function havePartitioning()    {        static $have_partitioning = false;        static $already_checked = false;        if (! $already_checked) {            $have_partitioning = PMA_MYSQL_INT_VERSION >= 50100 && PMA_DBI_fetch_value("SHOW VARIABLES LIKE 'have_partitioning';");            $already_checked = true;        }        return $have_partitioning;    }}?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?