My dog suffers from diarrhea
Diarrhea may be caused by many factors (indigestion, intoxication, communicable and infectious diseases, metabolic diseases, etc.) and must be treated in any case by a professional veterinarian. A home-made solution until professional help arrives would be to avoid solid food, because that stops bowel transit significantly.