UTI Question

I’ve never had a UTI before, but had to give a urine sample to get an x-ray done. It came back positive for a UTI. I have no symptoms of a UTI, like it doesn’t burn to pee and etc. I did have protected sex the night before so 24 hours hadn’t passed yet. Could that of affected the results?