Hi,

I get this message when adding the Audio: Track into the sort criteria in my audio view:

user warning: Unknown table 'audio_metadata_track' in field list query: SELECT node.nid, audio_metadata_track.value + 0 AS audio_metadata_track_value FROM node node WHERE (node.status = '1') AND (node.type IN ('audio')) ORDER BY audio_metadata_track_value ASC LIMIT 0, 10 in /home/dash/public_html/includes/database.mysql.inc on line 174.

Anyone know what this means? All the other audio tags work, but NOT track number - which I really need to get albums playing in the right order!

Comments

drewish’s picture

Status: Active » Postponed (maintainer needs more info)

which type of database server are you using? could you export the view you're trying to use and post that?

Dash’s picture

Here is the view with 'Audio: Tag Track' as the sort criteria. my DB is MySQL 4.1.22

  $view = new stdClass();
  $view->name = 'audio';
  $view->description = 'Audio nodes';
  $view->access = array (
  0 => '1',
  1 => '2',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = 'Audio';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'teaser';
  $view->url = 'audio';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->menu = TRUE;
  $view->menu_title = 'Audio';
  $view->menu_tab = FALSE;
  $view->menu_tab_weight = '0';
  $view->menu_tab_default = FALSE;
  $view->menu_tab_default_parent = NULL;
  $view->menu_tab_default_parent_type = 'tab';
  $view->menu_parent_tab_weight = '0';
  $view->menu_parent_title = '';
  $view->sort = array (
    array (
      'tablename' => 'audio_metadata_track',
      'field' => 'value',
      'sortorder' => 'ASC',
      'options' => '',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'taxletter',
      'argdefault' => '2',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'title',
      'label' => '',
      'handler' => 'views_handler_field_nodelink_with_mark',
      'options' => 'link',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'status',
      'operator' => '=',
      'options' => '',
      'value' => '1',
    ),
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'audio',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(audio_metadata_track, node);
  $views[$view->name] = $view;

(the view with 'Audio: Tag Title' is at: http://www.skipthebudgie.org/audio)

qbnflaco’s picture

I'm getting the same error with version 5.x-2.0-beta1 and I'm running MySQL 4.1.22

drewvancamp’s picture

Audio 5.x-1.3
PHP version 5.2.8
MySQL version 5.0.67-community

The view I'm using works fine so long as I don't try to sort it by track, in which case I get:

user warning: Unknown column 'audio_metadata_track.value' in 'field list' query: SELECT DISTINCT(node.nid), audio_metadata_track.value + 0 AS audio_metadata_track_value, audio_metadata_title.value AS audio_metadata_title_value FROM node node LEFT JOIN audio audio ON node.vid = audio.vid LEFT JOIN audio_metadata audio_metadata_album ON audio.vid = audio_metadata_album.vid AND audio_metadata_album.tag = 'album' LEFT JOIN audio_metadata audio_metadata_title ON audio.vid = audio_metadata_title.vid AND audio_metadata_title.tag = 'title' WHERE (node.type IN ('audio')) AND (node.status = '1') AND (audio_metadata_album.clean IN ('celestial_boogie')) ORDER BY audio_metadata_track_value ASC in /home/dlvadmin/public_html/includes/database.mysql.inc on line 172.

$view = new stdClass();
$view->name = 'albumcelestialboogie_dlv';
$view->description = '';
$view->access = array (
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Celestial Boogie';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'list';
$view->url = 'celestialboogie';
$view->use_pager = FALSE;
$view->nodes_per_page = '0';
$view->sort = array (
array (
'tablename' => 'audio_metadata_track',
'field' => 'value',
'sortorder' => 'ASC',
'options' => '',
),
);
$view->argument = array (
);
$view->field = array (
array (
'tablename' => 'audio_metadata_title',
'field' => 'value',
'label' => '',
),
array (
'tablename' => 'audio',
'field' => 'play_link',
'label' => '',
'options' => '1pixelout',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'audio',
),
),
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
array (
'tablename' => 'audio_metadata_album',
'field' => 'clean',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'celestial_boogie',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(audio_metadata_track, audio_metadata_title, audio, node, audio_metadata_album);
$views[$view->name] = $view;

drewvancamp’s picture

...Let me add that this seems to happen only for sorting by track or by year.