usually Bactrim (SMZ in china) is a very simple but effective drug for urinary tract infection
but, if you suspect pyelonephritis (kidney disease) (symptoms such as UTI, lower back and side pain, fever), which is an extension of the infection upto your kidneys, i suggest that you go to a doctor, usually the most effective treatment is to give you IV (intravenous drugs) antibiotics.
also, if you have this "pain" around intercourses, i don't know what kind of pain it is, if its lower abdominal pain, lower back pain, then you could also have "endometria", which is an implantation of some of your uterus tissues to other sites, you will usually feel the pain during or after the intercourse.