For about a year, my left knee keeps giving out

Patient: For about a year, my left knee keeps giving out randomly. I might be sitting down for too long and I wont be able to bend my knee or put weight on it as I would be getting a shocking pain. This does not happen everyday, and there is no pattern to when it happens, but it has been doing it a lot. I have had a MR scan done on my knee, and they have said that there is nothing wrong with it, could you explain to me why my knee keeps giving out randomly and then goes after about 5 minutes.

Symptoms: Knee pain

Doctor: