When the Holy Prophet came to know of the war preparations of the Quraish, he held a council of war. It was felt that in view of the large strength of the forces of the enemy it would not be possible for the Muslims to face the enemy in the open. The Muslims had a bitter experience of the Battle of Uhud, and it was not proper to repeat the mistake. It was accordingly necessary to adopt a new strategy to face the enemy. Salman Farsi, a companion who hailed from Persia suggested that a ditch be dug around Madina for the purposes of defense. This advice was accepted by the Holy Prophet, and it was decided that in the impending battle, the Muslims should remain on the defensive.
"When a person dies, his works end, except for three: ongoing charity, knowledge that is benefited from, and a righteous child who prays for him."
Prophet Mohammed (PBUH)
"The best of what a man leaves behind are three: a righteous child who supplicates for him, ongoing charity the reward of which reaches him, and knowledge that is acted upon after him."
Sunan Ibn Mājah
"Every day two angels come down from Heaven and one of them says, 'O Allah! Compensate every person who spends in Your Cause,' and the other (angel) says, 'O Allah! Destroy every miser.'"
Sahih Bukhari