Hi,
When I tried to filter quotes using taxonomy I received this error:
user warning: Column 'nid' in from clause is ambiguous query: SELECT DISTINCT(n.nid) FROM quotes q INNER JOIN node n ON q.vid=n.vid INNER JOIN term_node qtn USING(nid) WHERE n.status=1 AND n.type='quotes' AND q.promote = 1 AND qtn.tid IN (5) ORDER BY RAND() LIMIT 0, 1 in /home/piotr/websites/drupal/sites/all/modules/quotes/quotes.module on line 1240.

Problem could be solved by replacing USING with ON in quotes_block_join_sql(). For example line that caused my problem could be altered from:
$join .= " INNER JOIN {term_node} $aliases[term_node] USING(nid) ";
to:
$join .= " INNER JOIN {term_node} $aliases[term_node] ON $aliases[node].nid=$aliases[term_node].nid ";

Piotr

Comments

nancydru’s picture

Hmm, no one else has encountered this, but yes it can be changed. How about the user filter that is done the same way?

nancydru’s picture

Status: Active » Fixed

Committed to 6.x-1.x-dev

Status: Fixed » Closed (fixed)

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