I'm trying to create a function like the following:
CREATE FUNCTION TitleToFileName(title varchar(200)) RETURNS varchar(200)
BEGIN
set title = REPLACE(title,":"," ");
set title=REPLACE(title,"/"," ");
set title=REPLACE(title,"_"," ");
RETURN title;
END
MySQL shows error :
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 '' at line 3
I tried using ' instead of " and @title instead of title , but didn't work..
DELIMITER $$or something similar before the definition.