We compare predictions of the mean-field theory of superconductivity for ne
arly antiferromagnetic and nearly ferromagnetic metals in two dimensions. T
he calculations are based on a parametrization of the effective interaction
arising from the exchange of magnetic fluctuations. The Eliashberg equatio
ns for the transition temperature an solved including the full momentum dep
endence of the electron self-energy, The results shaw that for comparable p
arameters d-wave singlet pairing in nearly antiferromagnetic metals is gene
rally much stronger than p-wave triplet pairing in nearly ferromagnetic met
als in quasi-two dimensions, The relevance to the layered materials, and in
particular Sr2RuO4 that exhibits p-wave triplet pairing, is discussed.