I am trying to update a table on a purchase event so a admin gets an task depending on what is purchased. the products have codes with an catagory range between them which makes it easy because its an small shop. anyway how would i make this code work?
BEGIN
IF (NEW.ProductCODE BETWEEN 11 AND 19)
THEN
INSERT INTO PleskTBL ( `CustomerCODE`, `PleskCONTACT`, `PleskSTATUS`, `PleskACTION`)VALUES (new.CustomerCODE, 'Not Ready', 'Not Ready', '0');
ELSE IF (NEW.ProductCODE BETWEEN 21 AND 29)
THEN
INSERT INTO FTPTBL ( `CustomerCODE`, `FTPUSER`, `FTPPASSWORD`, `FTPSTATUS`) VALUES (new.CustomerCODE, 'Not Ready', 'Not Ready', 'NOT Ready');
END IF;
END;
it is returning:
MySQL reports: #1064 - There is something wrong in the syntax used at '' in line 10



