Sick spells

I’m 23 weeks and I’ve just had the 2nd spell of my stomach hurting really bad all of a sudden, diarrhea, throwing up, sweating. It takes about 30 minutes of all these then I feel better. The first time I had it I thought I had food poisoning. Other people tell me it’s just pregnancy. Has anyone else experienced this?