Sex with uti

If you have sex while having a urinary tract infection can it cause any problems?