An Error Was Encountered
Error Number: 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 alp_act_ascents.final = true ORDER BY `position`, alp_act_a' at line 8
SELECT alp_act_ascents.id, alp_act_ascents.odate, alp_routes.toponym, alp_routes.track, alp_route_style.style, alp_hardship.name AS hard, alp_routes.height, alp_routes.num, alp_act_ascents.total, IF(alp_act_ascents.position>0, alp_act_ascents.position, 99) AS `position`, alp_hardship.mballs, alp_act_ascents.couple, alp_act_ascents.pioneer, alp_act_ascents.frost FROM alp_act_ascents INNER JOIN alp_routes ON alp_act_ascents.route = alp_routes.id INNER JOIN alp_hardship ON alp_routes.hardship = alp_hardship.id INNER JOIN alp_route_style ON alp_routes.style = alp_route_style.id WHERE alp_act_ascents.champ_id = AND alp_act_ascents.final = true ORDER BY `position`, alp_act_ascents.odate;