mysql function if condition code example
Example: mysql else if
IF condition1 THEN
statements;
ELSEIF condition2 THEN # OPTIONAL
statements;
ELSE # OPTIONAL
statements;
END IF;
IF condition1 THEN
statements;
ELSEIF condition2 THEN # OPTIONAL
statements;
ELSE # OPTIONAL
statements;
END IF;