SELECT EXISTS ( SELECT 1 FROM reports WHERE report_category_id = '$id' AND (month = '$month' AND year = '$year') ) AS exist;