I'm trying to make a procedure that will take care of an insertion.
Unfortunately I get an error saying:
"Script line: 5 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 'END' at line 22"
I searched both on thescripts.com and other website and I can't get the right solution to this problem. It seems the error in line 5 is not really in line 5. Because there is nothing wrong with that.
Note that I'm running this code inside MySQL Query Browser.
Please if somebody tell me what is wrong with this code:
Expand|Select|Wrap|Line Numbers
- delimiter$$
- DROP PROCEDURE IF EXISTS SubmitInfo $$
- CREATE PROCEDURE SubmitInfo
- (
- id varchar(32)
- ,name varchar(50)
- ,surname varchar(45)
- ,stnumber varchar(7)
- ,dateOfGraduation integer
- ,graduationlevel varchar(45)
- ,currentaddress varchar(200)
- ,currentTel varchar(45)
- ,currentCareer varchar(45)
- ,email varchar(45)
- ,details varchar(500)
- ,pictureprovided integer
- ,emailpublic integer
- ,addtelpublic integer
- ,confirmed varchar(3)
- )
- BEGIN
- insert into alumni
- values (id
- ,name
- ,surname
- ,stnumber
- ,dateOfGraduation
- ,graduationlevel
- ,currentaddress
- ,currentTel
- ,currentCareer
- ,details
- ,pictureprovided
- ,emailpublic
- ,addtelpublic
- ,confirmed)
- END$$
- delimiter;
I'm waiting for your responses.
Aram Azhari