The water flows upwardly through a bed formed by a mixture of conductive and non-conductive particles, such as sand and graphite particles, with the particles of the bed being separated from an anode (mounted on one side of the bed) by an anionic membrane, and a cathode (mounted on the other side of the bed) by a non-ionic porous membrane.