hello when saving a node i get an error:

user warning: Column 'tid' in field list is ambiguous query: SELECT tid FROM term_node LEFT JOIN term_data tac_td ON t.tid = tac_td.tid WHERE (t.tid IN (0, 14) OR tac_td.vid NOT IN (4)) AND ( nid = 0) in /.../htdocs/sites/all/modules/taxonomy_menu/taxonomy_menu.database.inc on line 78.

function _taxonomy_menu_get_node_terms($nid) {
  $output = array();
  $result = db_query(db_rewrite_sql('SELECT tid FROM {term_node} WHERE nid = %d', 't', 'tid'), $nid);

should be

$result = db_query(db_rewrite_sql('SELECT t.tid FROM {term_node} WHERE nid = %d', 't', 'tid'), $nid);

Comments

gunzip’s picture

Title: db_rewrite_sql tid ambigue » db_rewrite_sql tid ambiguos
Version: master » 6.x-2.x-dev

sorry:

$result = db_query(db_rewrite_sql('SELECT t.tid FROM {term_node} t WHERE nid = %d', 't', 'tid'), $nid);
indytechcook’s picture

Thanks gunzip. I'll patch this tonight along with the other db_rewrite_sql statements.

indytechcook’s picture

Status: Active » Fixed

I committed this fix to DEV. The package should be available within the next 12 hours. Please test and let me know.

Thanks,
Neil

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.