本文整理汇总了PHP中PMA_Table::updateForeignKeys方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Table::updateForeignKeys方法的具体用法?PHP PMA_Table::updateForeignKeys怎么用?PHP PMA_Table::updateForeignKeys使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Table
的用法示例。
在下文中一共展示了PMA_Table::updateForeignKeys方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$multi_edit_columns_name = isset($_REQUEST['fields_name']) ? $_REQUEST['fields_name'] : null;
$html_output = '';
$upd_query = new PMA_Table($table, $db, $GLOBALS['dbi']);
// u p d a t e s f o r I n t e r n a l r e l a t i o n s
if (isset($_POST['destination_db']) && $cfgRelation['relwork']) {
if ($upd_query->updateInternalRelations($multi_edit_columns_name, $_POST['destination_db'], $_POST['destination_table'], $_POST['destination_column'], $cfgRelation, isset($existrel) ? $existrel : null)) {
$html_output .= PMA_Util::getMessage(__('Internal relations were successfully updated.'), '', 'success');
}
}
// end if (updates for internal relations)
$multi_edit_columns_name = isset($_REQUEST['foreign_key_fields_name']) ? $_REQUEST['foreign_key_fields_name'] : null;
// u p d a t e s f o r f o r e i g n k e y s
// (for now, one index name only; we keep the definitions if the
// foreign db is not the same)
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');