I have encountered this question many times in my seminars addressing parent concerns about their children. Another good idea would be to wrap your child's hands in something soft (such as soft gloves). This might deter him from putting his fingers in his mouth. Another good idea might be to smear his hands with anything bitter which is non-toxic such as bitter gourd juice. Each time he lifts his fingers to put them in his mouth, the bitter taste will deter him from doing it again.
Here is more information on how to deal with toddlers suffering from diarrhoea.
answered by P P