Author Topic: Help creating function to update two tables  (Read 2258 times)

Offline jasb

  • Jr. Member
  • **
  • Posts: 13
Help creating function to update two tables
« 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 ;
---