Whilst the ranking system you are referring to is valid in Spain, where standings of two teams with equal number of points are decided based on their head-to-head results, in a majority of European football leagues, the goal difference is the second most important factor (after number of points).