SELECT *
FROM battle_request
WHERE (br.id, br.timeout, br.cmt, br.hand_only, br.create_time, u.id id1, u.nick, u.level, u.last_activity_time, u.clan_id, c.icon, c.name clan_name1, u_cmd2.id id2, u_cmd2.nick command2_nick, u_cmd2.level command2_level, u_cmd2.clan_id clan_id2, c2.icon icon2, c2.name clan_name2)
FROM (battle_request br, user_in_battle ub, users u)
LEFT JOIN (user_in_battle cmd2) ON (cmd2.battle_id = br.id)
AND cmd2.command = "2"
LEFT JOIN (users u_cmd2) ON (cmd2.user_id = u_cmd2.id)
LEFT JOIN (clan c) ON (u.clan_id = c.id)
LEFT JOIN (clan c2) ON (u_cmd2.clan_id = c2.id)
WHERE br.id = ub.battle_id
AND ub.user_id = u.id
AND br.battle_type = "0"
AND br.status = "0"
AND ub.command = "1"