You are here

function _biblio_cck_join in Bibliography Module 6

Same name and namespace in other branches
  1. 6.2 includes/biblio.import.export.inc \_biblio_cck_join()
  2. 7 includes/biblio.import.export.inc \_biblio_cck_join()
  3. 7.2 includes/biblio.import.export.inc \_biblio_cck_join()

File

./biblio.import.export.inc, line 1225
Functions that are used to import and export biblio data.

Code

function _biblio_cck_join(&$biblio_fields) {
  $cck_join = '';
  $biblio_fields['nid'] = 'Node-ID';

  // identify records for update operations
  $query_cck_fields = "SELECT field_name, label from {node_field_instance} where type_name='biblio' and not (widget_type='image')";
  $res_cck_fields = db_query($query_cck_fields);
  while ($rec = db_fetch_object($res_cck_fields)) {
    $cck_table = 'content_' . $rec->field_name;
    $cck_field = $rec->field_name . '_value';
    $biblio_fields[$cck_field] = $rec->label;
    $cck_join .= ' left join {' . $cck_table . '} on b.vid=' . $cck_table . '.vid';
  }
  return $cck_join;
}