这是我的表结构(fun_users)
id first_name last_name email passkey place profession self_des profile_img user_type active last_login reg_date reported_banned
我的友谊表是
id user_id friend_id status date_request from_ip
这是我用来获取登录用户朋友详细信息的查询
SELECT `fun_friends`.`id` as fid, `fun_users`.`id` as uid, `fun_users`.`first_name`, `fun_users`.`profile_img`, `fun_users`.`profession`, `fun_users`.`place` FROM (`fun_friends`) JOIN `fun_users` ON `fun_users`.`id`=`fun_friends`.`friend_id` WHERE (`fun_friends`.user_id= '".$_SESSION['user_row_id']."' AND `fun_friends`.`status` =1) OR (`fun_friends`.friend_id= '".$_SESSION['user_row_id']."' AND `fun_friends`.`status` =1)
结果是
fid uid first_name profile_img profession place
11 47 Agnii thumbs/2013-03-311364721555.jpg Software engineer somewhere
该查询返回登录用户的详细信息而不是他的朋友详细信息。谁能帮我 ?