So David did as God had commanded him. He defeated the army of the Philistines from Gibeon all the way to Gezer.