We specifically tested the following hypotheses: (1) common genetic variants in TRPM6 and TRPM7 are associated with risk of developing type 2 diabetes because of their critical functions on maintaining magnesium homeostasis; and (2) The genetic association, if any, is more pronounced among women with inadequate magnesium intake. The gene discussed is TRPM6; the disease is type 2 diabetes mellitus.