PHOENIX -- Ray Durham and Jason Schmidt know when to make adjustments -- right when they're trying to get back into a pennant race.
The 5-foot-8 Durham credited his .338 batting average, six homers and 28 RBI since the All-Star break to hitting fifth in the order.
"I come up with guys on base and with a chance to drive them in, and I've just been doing that," said Durham, who hit an RBI single and a three-run homer in his 67th game in the No. 5 spot. "I didn't really consider myself as a true leadoff guy, because I had some power.
"Usually you think of your leadoff guy as hitting the ball the other way and beat out groundballs."
Arizona starter Brandon Webb noticed the difference.
"He was trouble for me last year," Webb said. "I hadn't had that much trouble with him this year, and today he was on. He was all over pretty much everything I was throwing up there, so he was a tough out."
Omar Vizquel added a two-run double, and J.T. Snow had base hits before each of Durham's run-scoring hits.
The Giants won for the fifth time in six games to move past Arizona for third place in the NL West. San Francisco is 6½ games behind the first-place Padres.
"We have seven more to get there," Giants manager Felipe Alou said. "The wild card is not going to come out of this division. So third place, second place, it don't mean anything."
Schmidt allowed three runs, four hits and three walks in 6 2/3 innings to improve to 5-0 in his last six starts. He continued to dominate the Diamondbacks, winning his third straight. Schmidt is 9-0 in 13 starts against them since a 6-4 loss on Sept. 4, 2002.
"These guys always seem to give me a good battle," Schmidt said. "Somehow I end up walking out of here with the win, and that's probably more attributed to the team we've always had, scoring runs for me."
Schmidt (12-6) matched his season high by striking out 10. That gave him 871 strikeouts with the Giants and moved him past John Montefusco for fifth place in San Francisco history.
"He threw some curveballs today," Diamondbacks manager Bob Melvin said. "We hadn't seen many curveballs out of him, and not only was he throwing it, he was throwing it as a put-away pitch. So he's been making adjustments against us every time out."
The right-hander came out after pinch-hitter Alex Cintron blooped a two-run double into right field in the seventh, cutting San Francisco's lead to 6-3. It was the fourth double Schmidt allowed, including two by Shawn Green.
Scott Eyre got the next four outs for the Giants, and Armando Benitez worked the ninth for his 10th save.
Durham, who drove in a run with a broken-bat single in the fourth, broke a 1-1 tie in the sixth with his three-run shot into the Giants' bullpen off Webb. It followed back-to-back singles by Snow and Moises Alou.
In the seventh, Mike Matheny and Randy Winn singled before Vizquel doubled to make it 6-1. Webb (11-11) was lifted for reliever Buddy Groom after giving up six runs and nine hits in 6 1/3 innings. He struck out seven.
Arizona took a 1-0 lead in the second on doubles by Green and Troy Glaus, but Schmidt then pitched four hitless innings.
Webb got 10 consecutive outs before Snow doubled in the fourth. Webb struck out Alou for the second out, then barely escaped injury on Durham's bizarre base hit. The ball hit Webb on the left shin and caromed into left field while the barrel of the bat sailed past his waist.
The Giants are 15-3 this year when Schmidt works at least six innings. ... Schmidt has three double-digit strikeout games this season and 23 in his career. ... Glaus got his 600th RBI with his double in the second. ... Snow's double was his 225th, one short of Orlando Cepeda for seventh in San Francisco history. ... 1B Tony Clark robbed Matheny of a hit with a full-extension, diving catch of his liner in the fifth. But Alou answered in Arizona's half, taking a hit away from Chris Snyder with a diving grab in LF.