This can be some sort of gastric infection or gastric upset which is causing this type of problem to your child. If the problem is not subsided in 3 days and is further woresening, than the chances of infection is more there and if there are other sign and symptom of infection is there as fever
or some sort if changes in the stool, than the chances of infection is there.
is mainly a type of viral infection which is causing gastric upset and is common in childrens, but it is difficult to make that this is viral and not bacterial in nature.
My advice to you is to consult some doctor regarding this and in the mean time try to maintain hydration with electrolyte balance and keep the higene proper.
Thanks and take care.