I have this little simple trigger..
BEGIN
DECLARE FILE_NAME VARCHAR(250);
DECLARE FILE_REFR VARCHAR(500);
SET FILE_NAME = 'Foo';
SET FILE_REFR = 'Bar';
--- I'd like to execute the next statement, using variable FILE_REFR between %% in a LIKE clause:
SELECT COUNT(*) INTO @num_rows FROM referers WHERE filename = FILE_NAME AND ref NOT LIKE "%FILE_REFR%";
...
...
...
END
Unfortunately, the variable name is not being picked up as a variable.. but as a CHAR, I know there is something missing there.
Help is more than appreciated.. :)