Uti and fever

My two year old daughter has been running a fever for 2 days with no other symptoms. I took her in and she has a uti. The doctor prescribed her antibiotics. I’ve been giving her pain medicine back to back and the fever comes back. She’s asleep and keeps waking up crying. How long before antibiotics work?