Thank you for your query on Healthcare Magic.
Your child is having two problems :
1. Acute diarrhea
due to which he is having loose stools and vomintings.
2. Ear infection
which is causing pain and eye discharge.
Some times infection in the body will lead to diarrhea called Parenteral diarrhea which subsides with treating the primary infection.
Continue medication as advised by the doctor.
Maintain hydration by giving sips of oral rehydration solutions like Pedialyte
Monitor hydration by urine output, activity, and skin turgor.
Consult the Pediatrician
again to get ear examined and treatment for it.
Hope I have answered your query.