Long time since Ive done any functions in MySQL and Im a bit stuck.
From memory Ive got the following:-
DROP FUNCTION IF EXISTS AddUser
CREATE FUNCTION AddUser(username VARCHAR(255, password VARCHAR(255))
INSERT INTO `users` (`username`, `password`) VALUES (username, AES_ENCRYPT(password,'cryptstring'));
I thought the issue was with the parameters, however the error is:-
#1064 - 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 'INSERT INTO `users` (`username`, `password`) VALUES (username, AES_ENCRYPT(passw' at line 3
Any ideas, what Im doing wrong?