Upset stomach tips? TMI warning

Does anyone have tips on how to deal with an upset stomach? I’ve been in and out of the bathroom having to go #2 & now am having diarrhea. Is there any meds I can take? I’m currently 35 weeks .