Stored procedure Problems (MYSQL)

Can you post the solution?