But when the Philistines heard that David had been anointed as king over all Israel, all the Philistines came up to seek David: and David heard of it, and went out against them.