There is no "flanking " rule, but what about an Ally within 5 feet?
You do not get advantage on an attack roll simply because one of your allies is within 5 feet of the creature you are attacking.
Some additional points on this topic:
1) If you are within 5 feet of a creature, you can use a “help” action to help an ally by distracting the creature and if the ally that you are helping attacks that creature before your next turn, he will get advantage on his attack.
2) Rogues can use their sneak attack if an ally is within 5ft of the target creature (or if the rogue has advantage on the attack).
3) Some creatures, such as the wolf for instance, have a special ability that grants them advantage on attack rolls against a target if one of the creature’s allies is within 5 feet of the target.
4) The DM Guide has optional flanking rules (which I will not be using) that gives you advantage when one of your allies are adjacent to an enemy and on opposite sides or corners of the enemy's space. It also has optional facing rules which I will not be using.
5) Having said all of that, I may still allow advantage on attacks in situations where I feel it is appropriate. Also rogues can have their sneak attack if I feel that their target creature is sufficiently distracted.