You are here

function data_update_6001 in Data 6

Same name and namespace in other branches
  1. 7 data.install \data_update_6001()

Move join information into meta fields.

File

./data.install, line 76
Install hooks for Data module.

Code

function data_update_6001() {
  $ret = array();
  $result = db_query('SELECT * FROM {data_join}');
  while ($row = db_fetch_object($result)) {
    if ($table = data_get_table($row->right_table)) {
      $table
        ->link($row->left_table, $row->left_field, $row->right_field, $row->inner_join ? TRUE : FALSE);
    }
  }
  db_drop_table($ret, 'data_join');
  return $ret;
}