We study the effects of a global magnetic field on viscously rotating and vertically integrated accretion discs around compact objects using a self‐similar treatment. We extend Akizuki & Fukue's work by discussing a general magnetic field with three components (r, ϕ, z) in advection‐dominated accretion flows (ADAFs). We also investigate the effects of a global magnetic field on flows with convection. For these purposes, we first adopt a simple form of the kinematic viscosity ν=αc2s/ΩK to study magnetized ADAFs: a vertical and a strong magnetic field, for instance, not only prevents the disc from being accreted but also decreases the isothermal sound speed. Then, we consider a more realistic model of the kinematic viscosity ν=αcsH, which makes the infall velocity increase but the sound speed and toroidal velocity decrease. We next use two methods to study magnetized flows with convection, i.e. we take the convective coefficient αc as a free parameter to discuss the effects of convection for simplicity. We establish the αc–α relation for magnetized flows using the mixing‐length theory and compare this relation with the non‐magnetized case. If αc is set as a free parameter, then |vr| and cs increase for a large toroidal magnetic field, while |vr| decreases but |vϕ| increases (or decreases) for a strong and dominated radial (or vertical) magnetic field with increasing αc. In addition, the magnetic field makes the αc–α relation be distinct from that of non‐magnetized flows, and allows the ρ∝r−1 or ρ∝r−2 structure for magnetized non‐accreting convection‐dominated accretion flows with α+gαc < 0 (where g is the parameter to determine the condition of convective angular momentum transport).