First time with a UTI

Since my husband and I are trying to conceive, obviously that means sex which as led me too have a UTI (Urinary tract infection). I have a prescription for tramadol, which is a pain medcinie. Does anyone know or think they could know if I could use the tramadol to help with the pain?