If you take garlic pills (from the vitamin aisle) you'll NEVER get sick while visiting Mexico.
The Mexicans that I know here, use water filters at the kitchen sink. They get ill when they drink our water.
Our first exchange student, from southern Mexico, had that problem at first. We all had it a few years later when we went down for her wedding. I guess what goes around, comes around. :)
Of course what's really going on is that they and we have a different mix of internal flora and fauna species and subspecies. Their systems don't like ours, and ours don't like theirs. For a little while anyway, until things sort themselves out.
She did get over her troubles in a few days.