Bacterial Infection

Has anyone ever gotten a bacterial infection while pregnant? If so, what did u take to get rid of it