After converting this code from MSSQL to MySql it refuse to run, the error is Variable not declared.
This is the Code from MSSQL
CREATE PROC [dbo].[spp