SELECT a.user_name,a.avatar,a.nicheng,a.user_rank,b.rank_name,b.rank_img FROM ecs_users a , ecs_user_rank b
WHERE user_id in(14495) and a.rank_points >= b.min_points and a.rank_points <= b.max_points ;
update ecs_users a,ecs_user_rank b
set a.user_rank =b.rank_id
WHERE user_id in(14495) and a.rank_points >= b.min_points and a.rank_points <= b.max_points ;