When you say kidney infection, I am assuming you mean a urinary tract infection.
depends on the type of organism that is causing the infection.Chances are that both can treat the infection. Sometimes bugs can be come resistant to antibiotic especially with overuse.If you have had multiple utis, it is best to get a urine culture
to determine the bacteria
and its sensitivity profile.