Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: jasb on September 20, 2009, 12:00:48 PM

Title: Help creating function to update two tables
Post by: jasb on September 20, 2009, 12:00:48 PM
Howdy people,

I'm asking for help to create a function in MySQL to use the password plugin, to update two tables.

so far i'm trying this, and no sucess, it complains about the function not returning any value, why? there's a return there!

---
DELIMITER $$
CREATE FUNCTION webmail_update_passwd (pwd text, account text) returns integer
BEGIN
update dbmail_users set passwd=pwd where userid=account;
update smtp_auth_users set password=pwd where username=account;
RETURN 1;
        END $$
DELIMITER ;
---