Roundcube Community Forum

 

Help creating function to update two tables

Started by jasb, September 20, 2009, 12:00:48 PM

Previous topic - Next topic

jasb

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 ;
---