Rae
I'd have this checked out with a focus on an arthritic/necrotic hip joint. My symptons were similar and Xrays and an MRI scan confirmed damage to the hip joint. (The discomfort in both hip and knee is due to the shared nerve structure, I believe.)
Depending on how advanced/severe the arthritis is, there are a load of options to address the pain and drag out a hip replacement - physiotherapy, exercise, weight loss.
What age bracket are you in, BTW?