Phpmyadmin create data code_php tutorial-PHP Tutorial

Source: Internet
Author: User
Phpmyadmin creates data code. Phpmyadmin data creation code? Php * vim: setexpandtabsw4ts4sts4: ***** @ version $ Id: db_create.php104692007-06-2914: 22: 48Zlem9 $ *** Getssomecorelibraries Phpmyadmin data creation code

/* Vim: set expandtab sw = 4 ts = 4 sts = 4 :*/
/**
*
* @ Version $ Id: db_create.php 10469 14: 22: 48Z lem9 $
*/

/**
* Gets some core libraries
*/
Require_once './libraries/common. inc. php ';
$ Js_to_run = 'functions. js ';
Require_once './libraries/mysql_charsets.lib.php ';

PMA_checkParameters (array ('DB '));

/**
* Defines the url to return to in case of error in a SQL statement
*/
$ Err_url = 'main. php? '. PMA_generate_common_url ();

/**
* Builds and executes the db creation SQL query
*/
$ SQL _query = 'create database'. PMA_backquote ($ db );
If (! Empty ($ db_collation) & PMA_MYSQL_INT_VERSION >=40101 ){
List ($ db_charset) = explode ('_', $ db_collation );
If (in_array ($ db_charset, $ mysql_charsets) & in_array ($ db_collation, $ mysql_collations [$ db_charset]) {
$ SQL _query. = 'default'. PMA_generateCharsetQueryPart ($ db_collation );
}
Unset ($ db_charset, $ db_collation );
}
$ SQL _query. = ';';

$ Result = PMA_DBI_try_query ($ SQL _query );

If (! $ Result ){
$ Message = PMA_DBI_getError ();
// Avoid displaying the not-created db name in header or navi panel
$ GLOBALS ['DB'] = '';
$ GLOBALS ['table'] = '';
Require_once './libraries/header. inc. php ';
Require_once './main. php ';
} Else {
$ Message = $ strDatabase. ''. htmlspecialchars ($ db).''. $ strHasBeenCreated;
Require_once './libraries/header. inc. php ';
Require_once './'. $ cfg ['defaulttabdatabase'];
}
?>

Why? Php/* vim: set expandtab sw = 4 ts = 4 sts = 4: * // ***** @ version $ Id: db_create.php 10469 14: 22: 48Z lem9 $ * // *** Gets some core libraries...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.