select us.username,u.cared,s.name,c.levelid,u.jointime,m.name from usr2card u left join ext_cardlevel c on c.cardid = u.cared left join users us on u.userid = us.id left join shop s on c.shopid = s.id left join merchant m on s.mid = m.id where 1=1