Drinking or eating contaminated water or foods generally causes diarrhoeal conditions which may or may not include fever and vomiting.
Since you didn't mention diarrhoea at all, you might have suffered heatstroke.
It's really important to make sure you don't get overheated and dehydrated.

Heatstroke can easily result from exertion or over exposure in hot environments combined with inadequate fluid intake or even too much alcohol.

Did you see a doctor at all when this happened before?