2 infections while pregnant!

Idk why I google things, but I did and it freaks me out. I'm 35 weeks and I went to the ER last night because I've been having some pains when urinating which I kind of thought it was UTI I was going to call on Monday but I had discharge with a tiny bit of blood so they told me to come in. Well I had the UTI and I have bv. Fml. I just got the meds for the UTI but I can't get the ones for bv yet because they're out I have to wait until tomorrow. But reading up on everything it says it all can cause premature labor or low birthweight. So it's just making me nervous. I kept having contractions last night that I had to get a shot to stop them but he said since it stopped with the shot they weren't true labor contractions and my cervix was still closed. But I still had a few more a while after the shot but they said it was okay and it's more than likely because of the infections that's causing them. Ugh, has anyone else had this happen while being pregnant? Did everything turn out okay?