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 'JOIN taxonomy AS up1 ON up1.id=taxonomy.child_of LEFT JOIN taxonomy AS up2 ON up' at line 1
SQL Statement: SELECT content_taxonomy.id as content_taxonomy_id, content_taxonomy.taxonomy_id as id,taxonomy.slug as slug,taxonomy.child_of as child_of,taxonomy.ignore_flag as ignore_flag,up3.tag as up3_tag,up2.tag as up2_tag,up1.tag as up1_tag,taxonomy.tag as taxonomy_tag,up3.id as up3_id,up2.id as up2_id,up1.id as up1_id,taxonomy.id as taxonomy_id FROM taxonomy JOIN content_taxonomy on taxonomy.id=content_taxonomy.taxonomy_id AND content_taxonomy.content_id= LEFT JOIN taxonomy AS up1 ON up1.id=taxonomy.child_of LEFT JOIN taxonomy AS up2 ON up2.id=up1.child_of LEFT JOIN taxonomy AS up3 ON up3.id=up2.child_of WHERE taxonomy.ignore_flag = 0 AND taxonomy.magazine_id=5 AND (up1.slug='knowledge-center' OR up2.slug='knowledge-center' OR up3.slug='knowledge-center') ORDER BY up3_tag ,up2_tag ,up1_tag , taxonomy_tag