SELECT DISTINCT
tr.object_id,tt.taxonomy, im . *
FROM
term_relationships AS tr
INNER JOIN term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN image AS im ON tr.object_id = im.ID
在上面的查询中,我希望它不显示我从tr.term_taxonomy_id = tt.term_taxonomy_id
获得的结果,如果它等于“cat”。
答案 0 :(得分:1)
SELECT DISTINCT
tr.object_id,tt.taxonomy, im . *
FROM
term_relationships AS tr
INNER JOIN term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
INNER JOIN image AS im ON tr.object_id = im.ID
WHERE taxonomy != 'cat'