You can prevent this from happening by giving him diluted pear, prune or grape juices - unlike some juices, these are safe for babies to drink (1 oz at a time) practically from birth. They have nutritional value and have a laxative effect - a great combination.
But if it's been 2 days already, you should put a baby-size glycerine suppository in him (or a soap-sliver suppository) - he needs rapid relief, something that'll make him do a dooey in 15 mins or less