@ysmina-- The kind of antibiotic used to treat a UTI depends on the cause of the UTI. There isn't just one cause, different kinds of bacteria can be responsible for it. Doctors will do a test to determine the bacteria and then prescribe the antibiotic that's effective against that strain.
Doxycyline is effective for UTIs that are caused by bacteria associated with chlamydia and mycoplasma. I had a mycoplasma caused UTI and I was given doxycycline. It was very effective, it cleared up the infection in a few weeks.