bad result
Posted: Thu Sep 17, 2009 8:00 am
Hello,
I'have a problem with my function:
It doesn't return result which I expected - it's always '0' but I'm absolutely sure that the function should returns something else.
Anybody knows where is the problem?
Thanks!
I'have a problem with my function:
Code: Select all
CREATE FUNCTION MovePhoto(oldFile VARCHAR(255), newFile VARCHAR(255), cmp CHAR(36))
RETURNS INT
BEGIN
DECLARE c INT;
SELECT COUNT(*) INTO c FROM photo WHERE name = @newFile;
RETURN c;
END//
Anybody knows where is the problem?
Thanks!