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


PHP Table::isEngine方法代码示例

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


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

示例1: isset

require 'libraries/tbl_common.inc.php';
$url_query .= '&goto=tbl_operations.php&back=tbl_operations.php';
$url_params['goto'] = $url_params['back'] = 'tbl_operations.php';
/**
 * Gets relation settings
 */
$cfgRelation = PMA_getRelationsParam();
// reselect current db (needed in some cases probably due to
// the calling of relation.lib.php)
$GLOBALS['dbi']->selectDb($GLOBALS['db']);
/**
 * Gets tables information
 */
require 'libraries/tbl_info.inc.php';
// set initial value of these variables, based on the current table engine
if ($pma_table->isEngine('ARIA')) {
    // the value for transactional can be implicit
    // (no create option found, in this case it means 1)
    // or explicit (option found with a value of 0 or 1)
    // ($create_options['transactional'] may have been set by libraries/tbl_info.inc.php,
    // from the $create_options)
    $create_options['transactional'] = isset($create_options['transactional']) && $create_options['transactional'] == '0' ? '0' : '1';
    $create_options['page_checksum'] = isset($create_options['page_checksum']) ? $create_options['page_checksum'] : '';
}
$reread_info = false;
$table_alters = array();
/**
 * If the table has to be moved to some other database
 */
if (isset($_REQUEST['submit_move']) || isset($_REQUEST['submit_copy'])) {
    //$_message = '';
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:31,代码来源:tbl_operations.php

示例2: PMA_getTableAltersArray

/**
 * Get table alters array
 *
 * @param Table   $pma_table           The Table object
 * @param string  $pack_keys           pack keys
 * @param string  $checksum            value of checksum
 * @param string  $page_checksum       value of page checksum
 * @param string  $delay_key_write     delay key write
 * @param string  $row_format          row format
 * @param string  $newTblStorageEngine table storage engine
 * @param string  $transactional       value of transactional
 * @param string  $tbl_collation       collation of the table
 *
 * @return array  $table_alters
 */
function PMA_getTableAltersArray($pma_table, $pack_keys, $checksum, $page_checksum, $delay_key_write, $row_format, $newTblStorageEngine, $transactional, $tbl_collation)
{
    global $auto_increment;
    $table_alters = array();
    if (isset($_REQUEST['comment']) && urldecode($_REQUEST['prev_comment']) !== $_REQUEST['comment']) {
        $table_alters[] = 'COMMENT = \'' . $GLOBALS['dbi']->escapeString($_REQUEST['comment']) . '\'';
    }
    if (!empty($newTblStorageEngine) && mb_strtolower($newTblStorageEngine) !== mb_strtolower($GLOBALS['tbl_storage_engine'])) {
        $table_alters[] = 'ENGINE = ' . $newTblStorageEngine;
    }
    if (!empty($_REQUEST['tbl_collation']) && $_REQUEST['tbl_collation'] !== $tbl_collation) {
        $table_alters[] = 'DEFAULT ' . Util::getCharsetQueryPart($_REQUEST['tbl_collation']);
    }
    if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'ISAM')) && isset($_REQUEST['new_pack_keys']) && $_REQUEST['new_pack_keys'] != (string) $pack_keys) {
        $table_alters[] = 'pack_keys = ' . $_REQUEST['new_pack_keys'];
    }
    $_REQUEST['new_checksum'] = empty($_REQUEST['new_checksum']) ? '0' : '1';
    if ($pma_table->isEngine(array('MYISAM', 'ARIA')) && $_REQUEST['new_checksum'] !== $checksum) {
        $table_alters[] = 'checksum = ' . $_REQUEST['new_checksum'];
    }
    $_REQUEST['new_transactional'] = empty($_REQUEST['new_transactional']) ? '0' : '1';
    if ($pma_table->isEngine('ARIA') && $_REQUEST['new_transactional'] !== $transactional) {
        $table_alters[] = 'TRANSACTIONAL = ' . $_REQUEST['new_transactional'];
    }
    $_REQUEST['new_page_checksum'] = empty($_REQUEST['new_page_checksum']) ? '0' : '1';
    if ($pma_table->isEngine('ARIA') && $_REQUEST['new_page_checksum'] !== $page_checksum) {
        $table_alters[] = 'PAGE_CHECKSUM = ' . $_REQUEST['new_page_checksum'];
    }
    $_REQUEST['new_delay_key_write'] = empty($_REQUEST['new_delay_key_write']) ? '0' : '1';
    if ($pma_table->isEngine(array('MYISAM', 'ARIA')) && $_REQUEST['new_delay_key_write'] !== $delay_key_write) {
        $table_alters[] = 'delay_key_write = ' . $_REQUEST['new_delay_key_write'];
    }
    if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'INNODB', 'PBXT')) && !empty($_REQUEST['new_auto_increment']) && (!isset($auto_increment) || $_REQUEST['new_auto_increment'] !== $auto_increment)) {
        $table_alters[] = 'auto_increment = ' . $GLOBALS['dbi']->escapeString($_REQUEST['new_auto_increment']);
    }
    if (!empty($_REQUEST['new_row_format'])) {
        $newRowFormat = $_REQUEST['new_row_format'];
        $newRowFormatLower = mb_strtolower($newRowFormat);
        if ($pma_table->isEngine(array('MYISAM', 'ARIA', 'INNODB', 'PBXT')) && (strlen($row_format) === 0 || $newRowFormatLower !== mb_strtolower($row_format))) {
            $table_alters[] = 'ROW_FORMAT = ' . $GLOBALS['dbi']->escapeString($newRowFormat);
        }
    }
    return $table_alters;
}
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:59,代码来源:operations.lib.php


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