Don't worry if it's really bad then it's probibly just gas. That happened to my little sister once and she was crying and every thing and then she ran to the bathroom after a while and she did her stuff (farted) for like 10 hours (not really maybe 10 minutes) and then she was 100% better.
It depends on the age of the child and how severe the stomach ache is.
If your child is in so much pain they are hunched over or it hurts to move they need to see a doctor asap or go to the emergency room.
For just an upset stomach gingerale, saltine crackers, and 7up.What are ways to encorage the child to talk?