If he isn't eating then he might be constipated. A constipated dog will frequently have a loss of appetite. Be sure and read the important note below before trying any of these methods for helping with constipation. If your dog is experiencing constipation on a regular basis you should add roughage to his diet such as canned pumpkin (not pie filling kind) or Metamucil. A spoon full of pumpkin on the dog's food should keep his bowels hydrated and his feces soft enough to pass.
A one time use of a spoon of mineral oil on his food can also be used but should not be used all the time.
There are two methods I use for young puppies, which may work on your dog. I first try lubricating a rectal thermometer and take the puppies temperature. This frequently stimulates the puppy into going. If this fails and you have a nasal bulb syringe (aspirator), you can put warm water in it and gently squeeze a small amount into the rectum and see if this doesn't help.
You can use a children's glycerin suppository depending on the size of your dog but the other methods are what I recommend you try first.
IMPORTANT NOTE If your dog ate a non-food item, bone or rawhide recently or if your dog is experiencing other symptoms such as vomiting, not eating or drinking, severe abdominal pain, the dog needs to see a vet and not treatment for constipation.. The above signs could indicate an intestinal obstruction, which you can read about here:
Now many times a dog will try and avoid defecating since it can hurt infected anal glands. There isn't much you can do at home to provide any real relief except perhaps some warm compresses if you don't empty the glands.. Many owners will alternate between warm and cool compresses, but I recommend warm ones myself. Groomers will also express the glands.
Since he is a small dog, I would be sure he does not become hypoglycemic by putting a drop of karo/pancake syrup on her tongue or get some nutrical to ensure the dog gets the proper nutrition while he isn't eating.