select uid,name from user where user.uid in (select byuid from msg where msg.uid=? union select uid as byuid from msg where msg.byuid=?)