本文整理汇总了PHP中PMA_getServerCollation函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_getServerCollation函数的具体用法?PHP PMA_getServerCollation怎么用?PHP PMA_getServerCollation使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_getServerCollation函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_getColumnOrder
/**
* Prepares the $column_order array
*
* @return array
*/
function PMA_getColumnOrder()
{
$column_order['DEFAULT_COLLATION_NAME'] = array('disp_name' => __('Collation'), 'description_function' => 'PMA_getCollationDescr', 'format' => 'string', 'footer' => PMA_getServerCollation());
$column_order['SCHEMA_TABLES'] = array('disp_name' => __('Tables'), 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_TABLE_ROWS'] = array('disp_name' => __('Rows'), 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_DATA_LENGTH'] = array('disp_name' => __('Data'), 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_INDEX_LENGTH'] = array('disp_name' => __('Indexes'), 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_LENGTH'] = array('disp_name' => __('Total'), 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_DATA_FREE'] = array('disp_name' => __('Overhead'), 'format' => 'byte', 'footer' => 0);
return $column_order;
}
示例2: PMA_getColumnOrder
/**
* Prepares the $column_order array
*
* @return array
*/
function PMA_getColumnOrder()
{
$column_order = array();
$column_order['DEFAULT_COLLATION_NAME'] = array('disp_name' => __('Collation'), 'description_function' => 'PMA_getCollationDescr', 'format' => 'string', 'footer' => PMA_getServerCollation());
$column_order['SCHEMA_TABLES'] = array('disp_name' => __('Tables'), 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_TABLE_ROWS'] = array('disp_name' => __('Rows'), 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_DATA_LENGTH'] = array('disp_name' => __('Data'), 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_INDEX_LENGTH'] = array('disp_name' => __('Indexes'), 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_LENGTH'] = array('disp_name' => __('Total'), 'format' => 'byte', 'footer' => 0);
// At this point we were preparing the display of Overhead using DATA_FREE
// but its content does not represent the real overhead in the case
// of InnoDB
return $column_order;
}
示例3: PMA_getColumnOrder
* to generate the links
*
* @global array $GLOBALS['db_url_params']
* @name $db_url_params
*/
$db_url_params['db'] = $_POST['new_db'];
$is_superuser = $GLOBALS['dbi']->isSuperuser();
$column_order = PMA_getColumnOrder();
$url_query = PMA_URL_getCommon(array('db' => $_POST['new_db']));
/**
* String that will contain the output HTML
* @name $new_db_string
*/
$new_db_string = '<tr>';
if (empty($db_collation_for_ajax)) {
$db_collation_for_ajax = PMA_getServerCollation();
}
// $dbstats comes from the create table dialog
if (!empty($dbstats)) {
$current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax, 'SCHEMA_TABLES' => '0', 'SCHEMA_TABLE_ROWS' => '0', 'SCHEMA_DATA_LENGTH' => '0', 'SCHEMA_MAX_DATA_LENGTH' => '0', 'SCHEMA_INDEX_LENGTH' => '0', 'SCHEMA_LENGTH' => '0', 'SCHEMA_DATA_FREE' => '0');
} else {
$current = array('SCHEMA_NAME' => $_POST['new_db'], 'DEFAULT_COLLATION_NAME' => $db_collation_for_ajax);
}
list($column_order, $generated_html) = PMA_buildHtmlForDb($current, $is_superuser, $url_query, $column_order, $replication_types, $GLOBALS['replication_info']);
$new_db_string .= $generated_html;
$new_db_string .= '</tr>';
$response = PMA\libraries\Response::getInstance();
$response->addJSON('message', $message);
$response->addJSON('new_db_string', $new_db_string);
$response->addJSON('sql_query', PMA\libraries\Util::getMessage(null, $sql_query, 'success'));
$response->addJSON('url_query', PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . $url_query . '&db=' . urlencode($current['SCHEMA_NAME']));
示例4: PMA_DBI_get_databases_full
if ($server > 0) {
$databases = PMA_DBI_get_databases_full(null, $dbstats, null, $sort_by, $sort_order, $pos, true);
$databases_count = $PMA_List_Database->count();
} else {
$databases_count = 0;
}
/**
* Displays the page
*/
if ($databases_count > 0) {
reset($databases);
$first_database = current($databases);
// table col order
// there is no db specific collation or charset prior 4.1.0
if (PMA_MYSQL_INT_VERSION >= 40100) {
$column_order['DEFAULT_COLLATION_NAME'] = array('disp_name' => $strCollation, 'description_function' => 'PMA_getCollationDescr', 'format' => 'string', 'footer' => PMA_getServerCollation());
}
$column_order['SCHEMA_TABLES'] = array('disp_name' => $strNumTables, 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_TABLE_ROWS'] = array('disp_name' => $strRows, 'format' => 'number', 'footer' => 0);
$column_order['SCHEMA_DATA_LENGTH'] = array('disp_name' => $strData, 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_INDEX_LENGTH'] = array('disp_name' => $strIndexes, 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_LENGTH'] = array('disp_name' => $strTotalUC, 'format' => 'byte', 'footer' => 0);
$column_order['SCHEMA_DATA_FREE'] = array('disp_name' => $strOverhead, 'format' => 'byte', 'footer' => 0);
$_url_params = array('pos' => $pos, 'dbstats' => $dbstats, 'sort_by' => $sort_by, 'sort_order' => $sort_order);
if ($GLOBALS['cfg']['MaxDbList'] && $GLOBALS['cfg']['MaxDbList'] < $databases_count) {
// Move to the beginning or to the previous page
if ($pos > 0) {
// loic1: patch #474210 from Gosha Sakovich - part 1
if ($GLOBALS['cfg']['NavigationBarIconic']) {
$caption1 = '<<';
$caption2 = ' < ';
示例5: PMA_getDbCollation
function PMA_getDbCollation($db)
{
return PMA_getServerCollation();
}
示例6: reset
$databases_count = 0;
}
/**
* Displays the page
*/
if ($databases_count > 0) {
reset($databases);
$first_database = current($databases);
// table col order
$column_order['DEFAULT_COLLATION_NAME'] = array(
'disp_name' => $strCollation,
'description_function' => 'PMA_getCollationDescr',
'format' => 'string',
'footer' => PMA_getServerCollation(),
);
$column_order['SCHEMA_TABLES'] = array(
'disp_name' => $strNumTables,
'format' => 'number',
'footer' => 0,
);
$column_order['SCHEMA_TABLE_ROWS'] = array(
'disp_name' => $strRows,
'format' => 'number',
'footer' => 0,
);
$column_order['SCHEMA_DATA_LENGTH'] = array(
'disp_name' => $strData,
'format' => 'byte',
'footer' => 0,
示例7: testGetServerCollation
/**
* Test for PMA_getServerCollation
*
* @return void
* @test
*/
public function testGetServerCollation()
{
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['DBG']['sql'] = false;
$this->assertEquals('utf8_general_ci', PMA_getServerCollation());
}