updateForeignKeys() public method

Function to handle foreign key updates
public updateForeignKeys ( array $destination_foreign_db, array $multi_edit_columns_name, array $destination_foreign_table, array $destination_foreign_column, array $options_array, string $table, array $existrel_foreign ) : array
$destination_foreign_db array destination foreign database
$multi_edit_columns_name array multi edit column names
$destination_foreign_table array destination foreign table
$destination_foreign_column array destination foreign column
$options_array array options array
$table string current table
$existrel_foreign array db, table, column
return array
コード例 #1
0
 /**
  * Update for FK
  *
  * @return void
  */
 public function updateForForeignKeysAction()
 {
     $multi_edit_columns_name = isset($_REQUEST['foreign_key_fields_name']) ? $_REQUEST['foreign_key_fields_name'] : null;
     // (for now, one index name only; we keep the definitions if the
     // foreign db is not the same)
     list($html, $preview_sql_data, $display_query, $seen_error) = $this->upd_query->updateForeignKeys($_POST['destination_foreign_db'], $multi_edit_columns_name, $_POST['destination_foreign_table'], $_POST['destination_foreign_column'], $this->options_array, $this->table, isset($this->existrel_foreign) ? $this->existrel_foreign['foreign_keys_data'] : null);
     $this->response->addHTML($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;
         $this->response->addHTML(Util::getMessage(__('Your SQL query has been executed successfully.'), null, 'success'));
     }
 }