When your dog is suffering from diarrhea plus constipation you should put the dog on a bland diet and feed the dog bland foods such as boiled skinless chicken and white rice which should also help to reestablish normal bowel movements in your dog.
You can also go onto websites online such as Chewy.com or or buy it in stores and it's some anti diarrhea medicine for dogs.
That should help stop the diarrhea in your dog and help with the above food diet should help with the constipation as well but if your dogs diarrhea lasts longer than 24 hours or it gets worse then you should take the dog to the vet to be checked out.
If the dog has too much diarrhea and loses too much fluids then it can dehydrate and die.