I'm creating a stored function like this
CREATE FUNCTION getVendorID(IN venname VARCHAR(255))
RETURNS INT
BEGIN
DECLARE a INT;
SELECT vendorid FROM vendors WHERE vendorname LIKE venname INTO a;
RETURN a;
END$$
but I receive an error:
ERROR 1064 (42000): 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 'IN venname VARCHAR(255))
RETURNS INT
BEGIN
DECLARE a INT;
SELECT vendorid FRO' at line 1