When the Philistines heard that David had been anointed king over all Israel, all the Philistines went up in search of David; and David heard of it and went out against them.