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...