Saul said to David, Behold, my elder daughter Merab, her will I give you as wife: only be valiant for me, and fight Yahweh's battles. For Saul said, Don't let my hand be on him, but let the hand of the Philistines be on him.
Saul's scheme which he supposed might get David killed by the Philistines did not work out.  Instead, David's many successful military missions led to his increasing popularity with all the people.  Also, David in those excursions against the enemy learned many valuable lessons that better equipped him for the long struggle against Saul and his later duties as king.