A stomachache for a day may be caused by gastroenteritis from consuming something unhygienic or expired. You can take medication for gastrointestinal disorders such as enteritis and see if the condition is relieved. If you still have diarrhea, you can drink light salt water to relieve the symptoms of dehydration caused by repeated diarrhea. If there is still no relief from the medication, it is time to go to the hospital quickly for treatment. In terms of diet, it may lead to loss of appetite, so you should eat more light food and drink more millet porridge made with low heat, which can be used to nourish the stomach and make the patient heal as soon as possible. You should not do strenuous exercise, lie in bed and rest a lot, and I believe you will be well soon. If you are suffering from appendicitis, you must go to the hospital immediately and have an appendectomy.