добавить предыдущую выборку?
(SELECT GROUP_CONCAT(id_recipe) FROM tc_feature_recipe WHERE id_feature_value =fvl.id_feature_value) AS id_recipes,
COUNT(fr.id_feature_value) AS count_recipes , CASE WHEN fr.id_feature_value IN (id_recipes) THEN 1 ELSE 0 END AS disabled
Вопрос не ясен. Нужно -- добавь.
Вот нахера ты такое лепишь? (SELECT GROUP_CONCAT(id_recipe) FROM tc_feature_recipe WHERE id_feature_value =fvl.id_feature_value) AS id_recipes,
Понял в чём вопрос, тебе надо просто повторить ещё раз подзапрос. select ... (SELECT GROUP_CONCAT(id_recipe) FROM tc_feature_recipe WHERE id_feature_value =fvl.id_feature_value) AS id_recipes, CASE WHEN fr.id_feature_value IN (SELECT id_recipe FROM tc_feature_recipe WHERE id_feature_value =fvl.id_feature_value) THEN 1 ELSE 0 END AS disabled
Обсуждают сегодня