⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 build_dump.lib.php

📁
💻 PHP
字号:
<?php/* $Id: build_dump.lib.php,v 1.39 2003/01/21 17:48:58 lem9 Exp $ */// vim: expandtab sw=4 ts=4 sts=4:/** * Set of functions used to build dumps of tables */if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){    define('PMA_BUILD_DUMP_LIB_INCLUDED', 1);    /**     * Uses the 'htmlspecialchars()' php function on databases, tables and fields     * name if the dump has to be displayed on screen.     *     * @param   string   the string to format     *     * @return  string   the formatted string     *     * @access  private     */    function PMA_htmlFormat($a_string = '')    {        return (empty($GLOBALS['asfile']) ? htmlspecialchars($a_string) : $a_string);    } // end of the 'PMA_htmlFormat()' function    /**     * Returns $table's CREATE definition     *     * @param   string   the database name     * @param   string   the table name     * @param   string   the end of line sequence     * @param   string   the url to go back in case of error     *     * @return  string   the CREATE statement on success     *     * @global  boolean  whether to add 'drop' statements or not     * @global  boolean  whether to use backquotes to allow the use of special     *                   characters in database, table and fields names or not     *     * @see     PMA_htmlFormat()     *     * @access  public     */    function PMA_getTableDef($db, $table, $crlf, $error_url)    {        global $drop;        global $use_backquotes;        $schema_create = '';        if (!empty($drop)) {            $schema_create .= 'DROP TABLE IF EXISTS ' . PMA_backquote(PMA_htmlFormat($table), $use_backquotes) . ';' . $crlf;        }        // Steve Alberty's patch for complete table dump,        // modified by Lem9 to allow older MySQL versions to continue to work        if (PMA_MYSQL_INT_VERSION >= 32321) {            // Whether to quote table and fields names or not            if ($use_backquotes) {                PMA_mysql_query('SET SQL_QUOTE_SHOW_CREATE = 1');            } else {                PMA_mysql_query('SET SQL_QUOTE_SHOW_CREATE = 0');            }            $result = PMA_mysql_query('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table));            if ($result != FALSE && mysql_num_rows($result) > 0) {                $tmpres        = PMA_mysql_fetch_array($result);                // Fix for case problems with winwin, thanks to                // Pawe

⌨️ 快捷键说明

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