cramp on rightside

so lastnight i had bad cramp on my right side.. that bad i had to use a hotwater bottle anyways 2 days before me and my pattner had intercourse whilst i had white discharge.. anyone know what this could be?? im not in anymore pain