Project:Taxonomy menu
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

#1

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);

#2

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

#3

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

#4

Status:fixed» closed (fixed)

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