Most likely you are suffering from
gastroenteritis also known as
stomach flu.Mostly Bacterial,Protozoal and viral infection causes inflammation in your stomach and intestines causing symptoms like vomiting, severe abdominal cramps, and diarrhea.You should get a stool routine and microscopy test done to see the cause of infection.If possible
ultra sound abdomen(abdomen scan) should be done.Joint ache is most likely due to electrolyte disbalance.
As it is recurrent Antibiotic like ofloxacin and
secnidazole can be taken for 5 days.
Strict dietery measures to be taken along with it.
Take a lot of soluble fiber in diet.
Take lots of curd in diet.It contains lactobacillus(Good bacteria of gut).
Have ispaghula husk 2 tsf twice daily.
An over counter
probiotic should be taken thrice a day.
Drink a lot of orange juice and coconut water.Take juices rich in potassium to compensate for electrolyte loss in stools.
Keep yourself hydrated,Drink plenty of boiled water.
Eat light food,Avoid spicy and junk food.
regards