I have a MySQL Query which executes correctly in SequelPro but doesnt execute in PHP Mysqli. The message which is shown:
Execution stopped. Message: An
Figured the answer out myself. The problem was as I said in SET @csum := 0; I dont know why but it works when I do a CROSS JOIN (SELECT @csum:=1) c after the last FROM in the statement.
SET @csum := 0;
CROSS JOIN (SELECT @csum:=1) c
FROM