Cephalosporins can play an anti-infective role for bacterial infections in UTIs. In the case of UTIs caused by gonococcal infections, third-generation cephalosporins, such as cefoperazone, can be preferred for anti-infective treatment. For UTIs caused by other bacteria, cephalosporins, such as cefuroxime and cefaclor, can also be used for anti-infective treatment. If UTIs caused by chlamydia or mycoplasma are considered, macrolide antibiotics, such as azithromycin, are best preferred for anti-infective treatment. However, if the UTI is considered to be caused by anaerobic infections, anti-anaerobic drugs such as metronidazole should be used for treatment, and antifungal drugs such as fluconazole or voriconazole should be used for treatment of fungal infections. So whether or not cephalosporins work for UTIs depends on the specific type of pathogen that is infected.