Given the data you reported (stomach discomfort, diarrhea for 20 times a day, pain in the back on the side of the ribs and chest pain, bubbles in the stomach) you might be experiencing stomach flu (gastroenteritis).
Stomach flu is a condition in which there is an infection affecting the digestive system. It might be caused by bacteria, virus or parasites. The most common symptoms include: diarrhea, nausea and vomiting, stomach pain and cramps, loss of appetite and fever. Pain in the whole body might be present, too. The loss of fluids with the diarrhea might lead to dehydration and subsequent weakness and fainting.
You might want to visit a general practitioner for a physical examination. A stool culture might be needed to determine more precisely what caused the infection and to determine the most effective treatment. If bacteria are detected, then antibiotic would be given. If a virus caused the condition, then rehydration (providing the lost fluids) would be enough. The body usually has enough immune system strength to fight with the most common viruses, but it might need time. Most of the cases of gastroenteritis caused by viruses last for up to 24 hours.