I get the error
Unknown column 'm.id' in 'on clause'
all my tables have a field called id. It appears to occur in my subquery. I use m.id in my join. So what the heck is going on? shouldnt i be able to access that var? how do i access media.id from my subquery? Also is the and not (select 1
part right? i am trying to exclude that tag.
select m.id from media m
join tag_name as n0 on n0.title = @a0
join media_tag as t0 on t0.media_id=m.id AND t0.tag_id = n0.id
where 1
AND not (select 1 from tag_name as n1
join media_tag as t1 on t1.media_id=m.id AND t1.tag_id = n1.id
where n1.title = @a1)
order by m.id desc;