Грешка со WordPress базата на податоци: [Column 'term_taxonomy_id' in FROM is ambiguous]
SELECT COUNT( DISTINCT 50F6O_posts.ID ) AS term_count, terms.term_id AS term_count_id
FROM 50F6O_posts
LEFT JOIN 50F6O_term_relationships ON (50F6O_posts.ID = 50F6O_term_relationships.object_id)
INNER JOIN 50F6O_term_relationships AS term_relationships ON 50F6O_posts.ID = term_relationships.object_id
INNER JOIN 50F6O_term_taxonomy AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN 50F6O_terms AS terms USING( term_id )
WHERE 50F6O_posts.post_type = 'product'
AND 50F6O_posts.post_status = 'publish'
AND (
50F6O_posts.ID NOT IN (
SELECT object_id
FROM 50F6O_term_relationships
WHERE term_taxonomy_id IN (7)
)
AND
50F6O_term_relationships.term_taxonomy_id IN (47,48,49,50,51,52,53,54,55,56,89)
)
AND terms.term_id IN (182,178,184,150,76,165,192,168,159,225,231,239,230,248,281,280,250)
GROUP BY terms.term_id