So David did as God commanded him, and they smote the army of the Philistines from Gibeon even to Gezer.