So David did what God commanded him to do, and he and his army defeated the army of Philistia, all the way from Gibeon city in the east to Gezer city in the west.