Use of molecularly imprinted polymers from a mixture of tetracycline and its degradation products to produce affinity membranes for the removal of tetracycline from water.