Closed valerio-bozzolan closed 5 years ago
With the power of triggers:
DROP TRIGGER IF EXISTS gravatarize; DELIMITER $$ CREATE TRIGGER gravatarize AFTER UPDATE ON ldto_user FOR EACH ROW BEGIN IF(NEW.`user_email` IS NOT NULL) THEN UPDATE ldto_user SET user_gravatar = MD5(NEW.user_email); END IF; END $$ DELIMITER;
With the power of triggers: