Diarrhea is the the normal adaptive responses of dogs. The possible reasons of diarrhea is that he has eaten something disagreeable, eaten too much, too fast or exercised too soon after eating, are overly excited or nervous. Take away all his food for 24 hours and then note his condition. Give him bland food after that. If problem persists then consult the vet.
Your dog more than likely does not have worms. You can give him/her a bland diet consisting of white rice and boiled chicken or hamburger. Some people also use plain yogurt, cottage cheese, and canned pumpkin (not pie filling). You have to be very careful dog's can dehydrate very quickly and once that happens that get sick fast. Make sure your pet is at least drinking water. If not you probably want to take it to the vet. You can give Imodium however, it is dosed depending on size and weight of your dog so you really want to talk to your vet about it. If you end up having to take your dog to the vet you more than likely going to be asked for a stool sample so it might be wise to bring one with you when you go. I know this answer is coming three months later but if it ever happens again I hope it will help.
You need to take your dog to the vet and have his stool analyzed. More likely your dog has worms...
He may have an upset stomach or those are the signs of Giardia (sp?) My dog had it and it's curable but a pain in the a$$ (no pun intended)
If your dog has been on antibiotics it may need acidophilus to normalize its intestinal flora. Try adding plain yogurt to the diet-2 tbsp- see if it helps.
Could just have upset tummy try starving it for 24hours(lots of water!) then only giving it cooked chicken and boiled rice for couple of days. I have 2 dogs and works really well when they get upset stomach and was recommended by vet if your dog still poorly after this would take it to vets for check-up to be safe and to put your mind at rest hope this helps!
If you are giving him a lot of canned food cut that back and see if that helps make sure you have him wormed and up to date on all shots