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 '' at line 3: select r.region, r.region_wreath, r.region_icon, if(r.winner_announce_year >= 1996,'Y','N') as winner_announced from wta_regions r where r.region_id =