I have the following MySQL query:
DELIMITER // CREATE PROCEDURE InsertResult (IN winnerID INT, IN loserID INT) BEGIN INSERT INTO KomperResult (WinnerID,
DECLAREs need to go on the first line of your procedure.
DECLARE
From the docs:
DECLARE is permitted only inside a BEGIN ... END compound statement and must be at its start, before any other statements.