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 'AND (recipes.status = 'active') ORDER BY recipes.title ASC' at line 13
SELECT id, code, photo, status, title, descr, category_id FROM recipes INNER JOIN recipe_category_assoc ON recipe_category_assoc.recipe_id = recipes.id WHERE recipe_category_assoc.category_id = AND (recipes.status = 'active') ORDER BY recipes.title ASC;