Point is beer can turn fast!!
It really CAN'T! Like one of the previous posters said, for every 100 people who come on here stating that they have an infection, only a small % actual do, and even some of those that do have an infection would have been able to still manage drinkable beer if they knew what they were doing.
Fermentation is smelly, ugly, nasty enterprise. CO2 smells like sulfer and will burn your nose, eyes, and throat. Krausen comes in many forms, but they all resemble and sometimes smell like throw up, mold, poop, mildew, bacteria, and chunky death.
Infections are HARD to get if you are even half-azzing sanitation, and beer does NOT turn quickly. The #1 infection is definitely the "brewer got scared of a little nastiness and didn't finish the brew" infection.
Next time, if you fear an infection, take a sample of the brew from UNDER the infection. Put that sample in a glass and put it in the freezer for about 5 minutes to let the CO2 layer dissipate. THEN taste it. If that sample doesn't taste absolutely NASTY (typically SOUR), then you DON'T have an infection. Even if you do get an infection and can catch it in the early stages, you can rack most of your beer from underneath the infection and get the beer cold and carbed (if you keg) quickly and often still end up with good beer.
Anyway, no telling what happened with your batch without a bit mroe information, but next time post a few pics here before you dump anything!!