Take you pet to the vet, please. i was sick when I was young and I too was taken to the vet for the same problems. I had diarrhea and tummy ache, I scooted across my owners floor, like I had to poop but not. I was getting Dehirdrated, from the diarrhea, which ended me in the doggie hospital. for two day's. I missed my owener's.
All better now, and another thing ask your vet for some low fat dog food I think it is called Hills i/d it is chicken and rice. low fat.
by the way if you boil chicken and some rice long grain in chicken broth and cut the chicken it to bite size pcs, mix it with 1/3 cup of rice, ( no broth) and give it to the dog for dinner, in a couple days he/ she will feel better.