ERROR: FAILED QUERY: SELECT COMPETITION.id AS liga_id, COMPETITION.name, COMPETITION.parent_id , year_id AS YEAR_id, YEAR.year_desc AS YEAR_desc, COMPETITION.status AS COMPETITION_status, COMPETITION.mannschaftsart_id AS MANNSCHAFTSART_id, MANNSCHAFTSART.name AS MANNSCHAFTSART_name, COMPETITION.number_of_teams, COMPETITION.number_of_climbers, COMPETITION.number_of_relegated_teams, COMPETITION.number_of_play_off_teams, DATE_FORMAT(COMPETITION.date, '%d.%m.%Y') as date FROM COMPETITION, YEAR, MANNSCHAFTSART WHERE COMPETITION.id = AND YEAR.id = COMPETITION.year_id AND MANNSCHAFTSART.id = COMPETITION.mannschaftsart_id LIMIT 0 , 1 :

error: 1064: 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 YEAR.id = COMPETITION.year_id AND MANNSCHAFTSART.id = COMPETITION.mannscha' at line 17