Ai
1 Star 0 Fork 0

spring299792/phpMyAdmin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
pmd_display_field.php 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
spring299792 提交于 2018-06-19 09:44 +08:00 . my phpmyadmin
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* @package PhpMyAdmin-Designer
*/
/**
*
*/
require_once './libraries/pmd_common.php';
$table = $T;
$display_field = $F;
if ($cfgRelation['displaywork']) {
$disp = PMA_getDisplayField($db, $table);
if ($disp) {
if ($display_field != $disp) {
$upd_query = 'UPDATE ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
. ' SET display_field = \'' . PMA_sqlAddSlashes($display_field) . '\''
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($table) . '\'';
} else {
$upd_query = 'DELETE FROM ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
. ' WHERE db_name = \'' . PMA_sqlAddSlashes($db) . '\''
. ' AND table_name = \'' . PMA_sqlAddSlashes($table) . '\'';
}
} elseif ($display_field != '') {
$upd_query = 'INSERT INTO ' . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.' . PMA_backquote($cfgRelation['table_info'])
. '(db_name, table_name, display_field) '
. ' VALUES('
. '\'' . PMA_sqlAddSlashes($db) . '\','
. '\'' . PMA_sqlAddSlashes($table) . '\','
. '\'' . PMA_sqlAddSlashes($display_field) . '\')';
}
if (isset($upd_query)) {
$upd_rs = PMA_query_as_controluser($upd_query);
}
} // end if
header("Content-Type: text/xml; charset=utf-8");
header("Cache-Control: no-cache");
die("<root act='save_pos' return=__('Modifications have been saved')></root>");
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/spring299792/phpMyAdmin.git
git@gitee.com:spring299792/phpMyAdmin.git
spring299792
phpMyAdmin
phpMyAdmin
master

搜索帮助