本文整理汇总了PHP中PMA_Table::updateDisplayField方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Table::updateDisplayField方法的具体用法?PHP PMA_Table::updateDisplayField怎么用?PHP PMA_Table::updateDisplayField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Table
的用法示例。
在下文中一共展示了PMA_Table::updateDisplayField方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: PMA_saveDisplayField
/**
* Saves the display field for a table.
*
* @param string $db database name
* @param string $table table name
* @param string $field display field name
*
* @return boolean
*/
function PMA_saveDisplayField($db, $table, $field)
{
$cfgRelation = PMA_getRelationsParam();
if (!$cfgRelation['displaywork']) {
return false;
}
$disp = PMA_getDisplayField($db, $table);
if ($disp && $disp === $field) {
$field = '';
}
$upd_query = new PMA_Table($table, $db, $GLOBALS['dbi']);
$upd_query->updateDisplayField($disp, $field, $cfgRelation);
return true;
}
示例2: list
if (isset($_POST['destination_foreign_db'])) {
list($html, $preview_sql_data, $display_query, $seen_error) = $upd_query->updateForeignKeys($_POST['destination_foreign_db'], $multi_edit_columns_name, $_POST['destination_foreign_table'], $_POST['destination_foreign_column'], $options_array, $table, isset($existrel_foreign) ? $existrel_foreign['foreign_keys_data'] : null);
$html_output .= $html;
// If there is a request for SQL previewing.
if (isset($_REQUEST['preview_sql'])) {
PMA_previewSQL($preview_sql_data);
}
if (!empty($display_query) && !$seen_error) {
$GLOBALS['display_query'] = $display_query;
$html_output .= PMA_Util::getMessage(__('Your SQL query has been executed successfully.'), null, 'success');
}
}
// end if isset($destination_foreign)
// U p d a t e s f o r d i s p l a y f i e l d
if ($cfgRelation['displaywork'] && isset($_POST['display_field'])) {
if ($upd_query->updateDisplayField($disp, $_POST['display_field'], $cfgRelation)) {
$html_output .= PMA_Util::getMessage(__('Display column was successfully updated.'), '', 'success');
}
}
// end if
// If we did an update, refresh our data
if (isset($_POST['destination_db']) && $cfgRelation['relwork']) {
$existrel = PMA_getForeigners($db, $table, '', 'internal');
}
if (isset($_POST['destination_foreign_db']) && PMA_Util::isForeignKeySupported($tbl_storage_engine)) {
$existrel_foreign = PMA_getForeigners($db, $table, '', 'foreign');
}
if ($cfgRelation['displaywork']) {
$disp = PMA_getDisplayField($db, $table);
}
// display secondary level tabs if necessary