Bananas help bind you up. The BRAT diet isn't recommended as its high in carbs/sugars which can make things worse.
You really need to get a sample to know what's causing it.
TMI but is it really foul smelling? Like rotten meat? Or sweeter.
I'm a nurse and have developed quite the nose for different infections.