Constipation in a three month

My lo has been suffering with constipation, the pass four days he has been doing little solid pebbles and it seems he struggling, someone told me boiled water given him some but nothing happens.