MySQL関数

http://idocsq.net/page/15

create function snsname2email (s int) returns text return ( select value from
member_config where name='pc_address' and member_id=s);