Thanks for writng to us with your health concern.
I have gone through your query with diligence. One good thing is that he has not passed any blood in the stool, so had no bouts of dysentry and hence we can rule out some of the bacterial causes for his problem.
Vague abdominal pain, cramps and foul smelling bouts of diarrhea points more towards malabsorption. He might have lactose intolerance, where a patient will develop such symptoms, on having any dairy products such as milk or cheese. He can also be allergic to certain food items. Commonly in infants and young children, rota virus is the leading cause of viral diarrhea. I will suggest you to get some tests done, since the poor kid has been suffering for a long time :-
1) CBC with ESR
2) Stool Culture : For ova, cysts and parasites
3) Renal Function tests ( RFT ) , LFT
4) Serum electrolytes
5) Rotavirus antigen test
6) CT Abdomen ( it can pick up some inflammatory condition, if present)
Once you get these tests done, the picture will be much clearer. Kindly consult a gastroenterologist to get an appointment for his condition and the tests. Once you're done, kindly upload the reports and we will assist you further.