Error!

MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'where content_id =24086 ) WHERE taxonomy.magazine_id= '6' and taxonomy.' at line 2
SQL Statement: SELECT tag, taxonomy.id FROM taxonomy JOIN content_taxonomy on taxonomy.id= content_taxonomy.taxonomy_id and content_taxonomy.content_id in (select associated_content_id from content_contents join contents on contents.published=1 and contents.status=3 and contents.id=content_contents.associated_content_id and contents.content_type_id= where content_id =24086 ) WHERE taxonomy.magazine_id= '6' and taxonomy.child_of='' group by tag